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

IPython sys.path different from python sys.path

I generally use IPython and only recently noticed that the the search path for imports is wrong in the regular python shell. From what I understand, sys.path inherits from PYTHONPATH (although I don't know where PYTHONPATH lives), is this different…
paulsef11
  • 628
  • 1
  • 8
  • 11
7
votes
4 answers

remove path and subpaths in matlab

I have been looking for a simple way to remove a bunch of paths from matlab. I am working with a fairly large program and it includes many paths in its directory. I also work with svn version handling and I use many branches, which in general…
patrik
  • 4,506
  • 6
  • 24
  • 48
7
votes
3 answers

breadth-first-search on huge graph with little ram

I currently have a graph that has about 10 million nodes and 35 million edges. For now the complete graph is loaded into memory at program start. This takes a couple of minutes (it is Java after all) and needs about half a gigabyte of RAM. For now…
allesblinkt
  • 346
  • 2
  • 7
7
votes
1 answer

Longest path approximation algorithm from a given node

I'm looking for an approximation algorithm for the following problem - I have an unweighted, undirected graph, with cycles, and want to find the longest path starting from a given node. I do value speed over performance (so a O(n^5) algorithm would…
r0u1i
  • 3,526
  • 6
  • 28
  • 36
7
votes
1 answer

If there is a colon (:) in the directory name, how could I add it to $PATH?

I am using mac os x, and I have some trouble setting the $PATH env. If the directory name is /path/to/add/a:b/bin, how can I add this directory to $PATH which is separated by :?
eccstartup
  • 501
  • 8
  • 24
7
votes
1 answer

How do I convert a relative path to a fully qualified path in C# / .NET?

Let's say I have a file name defined as "..............\bin\prices.xls", is there a simple way to convert that to a fully qualified path (one that includes the Drive letter, colon and all folders to the file)?
Bernhard Hofmann
  • 10,321
  • 12
  • 59
  • 78
7
votes
2 answers

Get the path of current project opened in Xcode plugin

I'm trying to create an Xcode plugin that should read all files contained in the project opened in Xcode and do further work with files names(Extract images names). The question is how to get the directory/path of the main bundle of the project…
Ali Amin
  • 667
  • 5
  • 17
7
votes
3 answers

Find a executable file path programmatically and fast

I want to find a .exe files path programatically in Java, for example: Skype.exe is entered into a program to find the direct path to it Program does an algorithm that finds the file path Program returns the file path…
Mitch Zinck
  • 312
  • 3
  • 11
7
votes
1 answer

Possible to include a command-line in a Node module without global install?

I have a small Node module that includes a command line script in the bin directory. "bin": { "generate": "./bin/generate.js" } The generate.js script is properly executable. This all works fine if I run npm install -g. But I'd…
Chris Wilson
  • 6,599
  • 8
  • 35
  • 71
7
votes
4 answers

Grails is not recognized as an internal or external command (Windows 7)

I don't know what I'm doing wrong... First I've downloaded, and unzipped the folder in C:\ : Then, set it as a user variable : And added it to my PATH : And even after restarting cmd, when I check grails -version I get this : grails is not…
Rob
  • 15,732
  • 22
  • 69
  • 107
7
votes
4 answers

Bash script to convert windows path to linux path

I'm new to shell scripting and trying to accomplish following, converting a windows path to a linux path and navigating to that location: Input: cdwin "J:\abc\def" Action: cd /usr/abc/def/ So, I'm changing the following: "J:" -> "/usr" and "\" ->…
user2987193
  • 133
  • 1
  • 1
  • 7
7
votes
2 answers

redirect to different server based on url path

I've made a new website for a client who has an intranet integrated into their old website. The new website is currently on a different server, but when the domain A records point to the new server, the old site (and intranet) will obviously not be…
user2992605
  • 73
  • 1
  • 3
7
votes
4 answers

PHP - with require_once/include/require, the path is relative to what?

when on "index.php", I do require_once("/all_fns.php"). "all_fns.php" itself requires files with paths relative to all_fns.php (itself). My question is, should I write the paths on all_fns relative to all_fns.php or to index.php? This is all very…
Gal
  • 23,122
  • 32
  • 97
  • 118
7
votes
2 answers

Searching a directory for folders and files using python

I have a directory structure like the one given below. MainFolder | [lib] / | \ [A] [B] [C] -- file1.so | | file2.so file1.so file1.so file2.so file2.so I'm…
DesperateLearner
  • 1,115
  • 3
  • 19
  • 45
7
votes
3 answers

How can I find context path in normal Java class

I want to find context path of my web Application in normal Java class.If I find I can specify paths like this /Rod1/thermalMap.exe wherever I need. I know, How to find in servlet using the following code getServletContext().getRealPath(""); My…
Hanumath
  • 1,117
  • 9
  • 23
  • 41