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
6
votes
1 answer

Executing "echo" using Java ProcessBuilder doesn't interpolate variables (outputs the string "$PATH")

I want to echo the PATH variable, with the goal to get the same output from a Java ProcessBuilder as running echo $PATH in the terminal. However, when it executes the output is actually $PATH instead of the value of the PATH variable. I wonder if…
Aaron Silverman
  • 22,070
  • 21
  • 83
  • 103
6
votes
2 answers

How can I get a UNC path for a file that is accessed through a network drive?

I am working on a application in VC++ where network drives are used to access files. The drives are assigned manually by the users and then select the drive in the application. This results in drives not always being mapped to the same…
Paradoxyde
  • 757
  • 2
  • 10
  • 15
6
votes
2 answers

Writing my own shell in C, how do I run Unix executables?

In one of my courses we're writing our own shell (basically from scratch). We've already handled writing a lexer and a parser to divide the input into nice "command" structures that are easier to deal with. Likewise, I have a function…
Casey Patton
  • 4,021
  • 9
  • 41
  • 54
6
votes
6 answers

Path to folder outside of folder

I have a folder for all my css in my main folder called "main." In "main" I have another folder called "math." I would like to use my css in the "math" folder, but when I type:
kirby
  • 3,981
  • 14
  • 41
  • 54
6
votes
1 answer

Having some a map and some root we'd like to follow what standard algorithm would help in creating path?

We have some set of points (each point has its X and Y) and a multy map of roots [point, point]. We can move via roots from any point to any in any possible direction. We are given some path of 2d points we want to follow as close to as possible: …
myWallJSON
  • 9,110
  • 22
  • 78
  • 149
6
votes
2 answers

Reading pdf stored in internal Memory(The File path is not Valid)

I wanna open a pdf stored in Mobile internal Memory... i'm trying to pass the path of the file to the Uri ..but it keep showing me this error "The file path is not Valid" but i'm sure that i'm putting the right path.. targetFile=new…
Reham
  • 1,916
  • 6
  • 21
  • 45
6
votes
3 answers

Is there a simple Program Files/Program Files (x86) directive for C++ in windows?

I am currently hard-coding the path to my application as follows: const char* OriginCopyFile = "C:\\Program Files (x86)\\i-cut\\i-cut\\Origin_copy.txt"; This application is going to be running in both 32 and 64 systems. How can I detect the path…
Peretz
  • 1,096
  • 2
  • 18
  • 31
6
votes
3 answers

Using Absolute Versus Relative Paths for Images

A coworker just asked me if there were any reason why referring to images with a relative path would impede site speed. While for cleanliness it's a good idea to have the fewer characters of a relative path, but wondering if there are other…
Keefer
  • 2,269
  • 7
  • 33
  • 50
6
votes
2 answers

How to get the script path in R?

Possible Duplicate: Rscript: Determine path of the executing script Always I run an R script, it take My Documents as working directory. When I run the script, I want to get the script path and change the working directory to it. How I can do…
Renato Dinhani
  • 35,057
  • 55
  • 139
  • 199
6
votes
3 answers

need to find PHP installation path from a Windows .cmd script without using PHP

I am building windows .cmd files which will run demo examples of our PHP tools. I have a "catch-22" problem, I need to determine how to find the PHP installation path from a Windows .cmd script without using PHP. EasyPHP does not install itself…
Ron Whites
  • 1,721
  • 3
  • 12
  • 8
6
votes
5 answers

Unable to execute jar file despite having PATH and CLASSPATH set

My question is regarding including jar files in path. It has 2 parts. 1) I am trying to execute weka.jar jar file located in /home/andy/software/weka/weka.jar PATH variable points to this jar file (i.e. to /home/andy/software/weka/weka.jar) and so…
user721975
  • 1,257
  • 3
  • 13
  • 14
6
votes
3 answers

Getting the relative path from the full path

I have to get the path excluding the relative path from the full path, say The relative path is ,C:\User\Documents\ fullpath ,C:\User\Documents\Test\Folder2\test.pdf I want to get only the path after the relative path i.e \Test\Folder2\test.pdf how…
Selwyn
  • 1,621
  • 6
  • 21
  • 38
6
votes
4 answers

Relative and absolute paths on ASP.NET/IIS

I've read many articles about relative/absolute paths, but I still can't grok this problem. The following code is from my ASP.NET Master page:
  • Reports
  • notAnonymousAnymore
    • 2,637
    • 9
    • 49
    • 74
    6
    votes
    1 answer

    Counting the number of shortest paths through a node in a DAG

    I'm looking for an algorithm to count the number of paths crossing a specific node in a DAG (similar to the concept of 'betweenness'), with the following conditions and constraints: I need to do the counting for a set of source/destination nodes in…
    user622368
    • 113
    • 8
    6
    votes
    6 answers

    I did update flutter 3.7 and flutter doctor

    I can build flutter project . but I did catch warning by flutter doctor I want fix . warning code [!] Flutter (Channel stable, 3.7.0, on macOS 13.0.1 22A400 darwin-arm64, locale ja-JP) ! Warning: `dart` on your path resolves to …
    Tdayo
    • 269
    • 4
    • 11
    1 2 3
    99
    100