Questions tagged [path]

The general form of a file or directory name that specifies a unique location in a file system. In many Linux and Unix-like OS the PATH (all upper case) variable specifies the directories where executable programs are searched for.

A path represents a unique file system location using the directory tree hierarchy expressed in a string of characters in which path components, separated by a delimiting character, represent each directory. The delimiting character is most commonly a slash /, a backslash \, or a colon :.

A PATH (all upper case, ) in the Linux, UNIX-like operating systems and Windows contains list of directories, where the shell searches through, when a command is executed. The executables are stored in different directories in the OS. On UNIX-like OS the directories are separated by colon, on Windows by semi-colon.

Examples

Simple way to show the $PATH variable is:

echo "$PATH"
printf "%s\n" "$PATH"

A typical PATH looks like:

/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin

More generally, a path is a sequence of directions that, when followed in order, reach a certain object or location.

In addition to file system paths, there are paths through a tree:

root->left->right->right->left

or, again more generally, a set of attributes on an object.


There might be some other contexts where the term "path" is used to described something non-URI and non-directory related which are not covered by the general description.

One case would be in a context such as in the SCADA software, Ignition, where the term "path" is generally used to refer to tag-path - as Tag is the basic unit in the software, forming a hierarchical system like directory. Typical tag-path in Ignition look like this:

BaseFolder/MyTag

Or, more complexly when tag is not in the BaseFolder but referred from another "Parent" Tag:

BaseFolder/MyAdvanceUDTTag/MyBaseUDTTag/MyTag
19410 questions
7
votes
1 answer

Node.js scraping, converting image src -> full URL

I'm using Cheerio (https://github.com/MatthewMueller/cheerio) to scrape websites and get images for a project I'm working on. I'm wondering if there's an easy way with Node.js (or another package) to convert the $(img).attr('src') to a fully…
ewindsor
  • 885
  • 10
  • 24
7
votes
3 answers

PHP get path to every file in folder/subfolder into array?

Possible Duplicate: PHP SPL RecursiveDirectoryIterator RecursiveIteratorIterator retrieving the full tree I am not sure where to start. But I have to get the paths to all files in a folder and all the content of the subfolder in paths too. For…
Papa De Beau
  • 3,744
  • 18
  • 79
  • 137
7
votes
2 answers

Set a bash variable each time the directory changes

I would like a variable available my bash shell similar to pwd but equal to a section of the current working directory, rather than the whole path. i.e., $PWD=/a/b/c/d/e/f $PATH_SECT=c/d/e I have a prompt that displays this path already, but I…
Tom
  • 702
  • 7
  • 16
7
votes
2 answers

Does adding directories to the Windows Path variable affect performance?

The environment variable Path contains the places where Windows looks for programs to run files having the different extensions. More directories would mean more places to look in for the relevant programs, hence if there are a lot of directories,…
asheeshr
  • 4,088
  • 6
  • 31
  • 50
7
votes
2 answers

Striping last directory from path with regex in Ruby?

I have a list of documents that I've collected using Dir.glob in Rails 3. The result is a list of paths similar to the following: /home/danny/nurserotas/GREEN WEEK 2ND JAN 2012.xls What I would like to achieve is striping everything up, and…
dannymcc
  • 3,744
  • 12
  • 52
  • 85
7
votes
3 answers

OSX - ZSH - PATH - /usr/bin duplicated

I need some help to understand why my path looks like the way it looks. Issuing echo $PATH in zsh returns…
politicus
  • 459
  • 6
  • 14
7
votes
5 answers

Python Glob.glob: a wildcard for the number of directories between the root and the destination

Okay I'm having trouble not only with the problem itself but even with trying to explain my question. I have a directory tree consisting of about 7 iterations, so: rootdir/a/b/c/d/e/f/destinationdir The thing is some may have 5 subdirectory levels…
7
votes
2 answers

Stretching a XAML Path to fill its containing element

I have a ControlTemplate with some Paths in it. I would like the Paths to stretch and fill the control they are in, such as a Button. How can I do this? What I have currently looks like this:
sourcenouveau
  • 29,356
  • 35
  • 146
  • 243
7
votes
4 answers

Android Download Manager

I think i have a rather simple question. http://www.vogella.com/blog/2011/06/14/android-downloadmanager-example/ I have been following a tutorial in the above url. How do I change the filepath for downloads? Thanks in Advance
Mich
  • 105
  • 1
  • 2
  • 9
7
votes
3 answers

How to fix forward slash issue in path on windows in python?

I have developed an application in python and pyside. I have developed it on linux machine. Now I want to deploy it on windows machine. Here problem is path. In linux forward slash(/) used as separator but windows uses backward slash(\) as…
anils
  • 1,782
  • 6
  • 19
  • 29
7
votes
2 answers

How to set image path dynamically in MVC 3 RAZOR

How to set image path dynamically for following: "/Images/Model" this path is fixed, rest of the path comes from [ModelImagePath] column of Model DBTable. Please guide me how to set the path…
Paul
  • 457
  • 2
  • 11
  • 26
7
votes
3 answers

2D rendering and zooming in with SVG

My task is to develop an algorithm that fits different kinds of curves onto a given point-sequence in 2 dimensional space. To be able to test my algorithm, I have chosen SVG to display the result. I have several problems with it. As there may be…
libeako
  • 2,324
  • 1
  • 16
  • 20
7
votes
2 answers

OSX: API for retrieving path to user's ~/temp folder

Does OS X have a separate temp folder for each user? If so, how to retrieve the temp folder path for the current user programmatically? PS Looking at my own OS X file system, I can't see such a folder.
P i
  • 29,020
  • 36
  • 159
  • 267
6
votes
1 answer

python os.path.realpath not working properly

I have following code: os.chdir(os.path.dirname(os.path.realpath(__file__)) + "/../test") path.append(os.getcwd()) os.chdir(os.path.dirname(os.path.realpath(__file__))) Which should add /../test to python path, and it does so, and it all runs…
jj.
  • 105
  • 1
  • 1
  • 5
6
votes
1 answer

CSS relative url to images

I am developing on my localhost - http://localhost/mysite, and within that I have the following directory structure: -assets --css ---styles.css --images ---background.png Within the styles.css file, I would have something the following, which…
JonoB
  • 5,801
  • 17
  • 55
  • 77