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
2 answers

NODE.JS - how to handle a mix of OS and URL-style "paths" correctly?

In my node.js app I have functions which can be passed either OS-style paths e.g. c:\my\docs\mydoc.doc (or /usr/docs/mydoc.doc or whatever is local) File URLS e.g. file://c:/my/docs/mydoc.doc (which I'm not sure about the validity of '\'s…
user834595
7
votes
3 answers

Os.path : can you explain this behavior?

I love Python because it comes batteries included, and I use built-in functions, a lot, to do the dirty job for me. I have always been using happily the os.path module to deal with file path but recently I ended up with unexpected results on Python…
Bite code
  • 578,959
  • 113
  • 301
  • 329
7
votes
5 answers

How can I construct OS-independent file paths in Perl including an optional Windows drive letter?

I need to construct a file path inside a Perl script. Which path separator should I use to allow my script to work on both Windows and Unix? Keep in mind that Windows needs a drive letter.
Sergey Stadnik
  • 3,100
  • 8
  • 27
  • 31
7
votes
3 answers

Change Wordpress Image URL

On my wordpress site all my images are showing up as broken links. They are also showing up as broken links in the media gallery in the wordpress backend. I inspected the images using Google chrome and saw that they all show up like this:
contool
  • 1,034
  • 3
  • 18
  • 29
7
votes
3 answers

How can I take STDIN and use it on the bash shell to set an environment variable?

I'm trying to get better at one-liners here, this is what I have currently. $ echo $PATH /home/ubuntu/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games What I want to do is strip off that first chunk, so here's what I've…
Tom
  • 330
  • 4
  • 15
7
votes
2 answers

mysql var/lib/mysql directory doesn't exist, can't start mysql server

I have read many a forum post and hopeful solution to the problem I am having with getting my own mysql server to start and work properly, but none so far have worked. Many of the forum posts I've read make reference to a /var/lib/mysql folder, as…
almel
  • 7,178
  • 13
  • 45
  • 58
7
votes
3 answers

How can I access the "Documents and Settings" folder?

I'm using C# .NET 4 with VS 2010. When Iterating over some paths, I'm running this line: files = Directory.GetFiles(path, searchPattern); I get an exception when the path is the documents and settings folder. How can I access it? And no, I don't…
CodeMonkey
  • 11,196
  • 30
  • 112
  • 203
7
votes
2 answers

D3, SVG and textPath: How to move the text down?

I've got a diagram with some text written along one of the paths using a textPath. However, my problem is: I need the text to be on the other side of the text path, ie, sitting below it. Here's an example: I need the text here to be within the…
Cheyne
  • 1,964
  • 4
  • 27
  • 43
7
votes
1 answer

Converting SVG paths with holes to extruded shapes in three.js

I have a shape that consists of 4 polygons: 2 non-holes and 2 holes. This is only an example. In reality there can be a shape that consists of 50 polygons, of which 20 are non-holes and 30 are holes. In SVG path this like polygon can be represented…
Timo Kähkönen
  • 11,962
  • 9
  • 71
  • 112
7
votes
3 answers

What does "shadows it in the MATLAB path" mean? How to do it in a file?

I need to do this always before running unitTester file. I cannot understand why this is required. What does this mean? And why is the "Add to Path > Selected Folders and Subfolders" not enough? [Update] This here may be the problem. The kernel is…
hhh
  • 50,788
  • 62
  • 179
  • 282
7
votes
3 answers

How to permanently change sudo's $PATH variable (Ubuntu 9.x)

I want add some directory to the $PATH when running sudo, this is a (semi) permanent requirement, not something that needs to be added to the scripts themselves. I notice that Django has managed to do it, (my $PATH when running sudo is…
simon slingsby
  • 71
  • 1
  • 1
  • 2
7
votes
2 answers

Why CFileDialog::GetNextPathName doesn't work when the file path is long?

Using CFileDialog class, I select multiple files placed in a directory with a long path. It's OK when I select only one or two files; but when I select three files at the same time it returns only a part of the third file path. (Looks like it's…
Javid
  • 2,755
  • 2
  • 33
  • 60
7
votes
1 answer

windows shortcut with relative path to the icon

Is there a way to set relative path to the icon in win shortcut? for the target location it works fine: %windir%\system32\cmd.exe /c "cd %CD% && start fileToExecute.bat" I read that win shortcuts can pick up icon from .exe files automatically but…
31415926
  • 3,811
  • 7
  • 47
  • 78
7
votes
3 answers

How to erase path area from canvas (Android)

I need to crop corners on ImageView. Not to round them but erase triangles from each corner. Seems like the only way to do that is to override onDraw method and erase these areas from canvas using Path. The problem is I have not solid color…
Dmitriy
  • 830
  • 3
  • 15
  • 29
7
votes
2 answers

Python Split path recursively

I am trying to split a path given as a string into sub-parts using the "/" as a delimiter recursively and passed into a tuple. For ex: "E:/John/2012/practice/question11" should be ('E:', 'John', '2012', 'practice', 'question11'). So I've passed…
user1757703
  • 2,925
  • 6
  • 41
  • 62