Questions tagged [path]

Path in computer file systems is in general the human-readable address of a filename or directory specifying a unique location in a file system, and expressed by a string of path components separated by a delimiter (most commonly the slash "/" or the backslash "").

PATH (variable), is an environment variable specifying a list of directories where executable programs are located.

Path in computer file systems is in general the human-readable address of a filename or directory specifying a unique location in a file system, and expressed by a string of path components separated by a delimiter (most commonly the slash "/" or the backslash "\").

PATH (variable), is an environment variable specifying a list of directories where executable programs are located.

1271 questions
415
votes
6 answers

What are PATH and other environment variables, and how can I set or use them?

Questions about setting environment variables the PATH are very common here, and in most cases the answers are very similar to each other. In the future it would be nice to have a good Q/A for this. So the question is: What are environment…
slhck
  • 235,242
310
votes
9 answers

Using cd command in Windows command line, can't navigate to D:\

This may be a silly question, and I think I have looked elsewhere to find the answer... Might be a path issue, but when I open the command line and type from the C:\>: cd D:\ I cannot get to the D drive. Even if I type: cd D:\ The…
nicorellius
  • 6,815
211
votes
8 answers

How to delete a file in Windows with a too long filename?

My wife has several files and folders that somehow ended up having filenames that have caused them to be undeleteable (can't be deleted) by normal means or via the command line. I believe the filenames are too long due to the depth of the folder…
user3048
  • 2,249
183
votes
23 answers

Add directory to $PATH if it's not already there

Has anybody written a bash function to add a directory to $PATH only if it's not already there? I typically add to PATH using something like: export PATH=/usr/local/mysql/bin:$PATH If I construct my PATH in .bash_profile, then it's not read unless…
Doug Harris
  • 28,397
174
votes
10 answers

Is there a convenient way to edit PATH in Windows 7?

I do not understand why Windows 7 is still adopting this stuffy dialog box? I feel uncomfortable when editing and looking-up a path in this narrow text box. Is there a convenient way to edit PATH in Windows 7? One item per row for example.
Display Name
  • 2,229
161
votes
6 answers

What's the difference between “which” and “whereis?”

What's the difference between which and whereis?
mk12
  • 3,342
145
votes
8 answers

Where does $PATH get set in OS X 10.6 Snow Leopard?

I type echo $PATH on the command line and get /opt/local/bin:/opt/local/sbin:/Users/andrew/bin:/usr/local/bin:/usr/local/mysql/bin:/usr/local/pear/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/opt/local/bin:/usr/local/git/bin I'm…
Andrew
  • 15,494
121
votes
2 answers

Why does Windows use backslashes for paths and Unix forward slashes?

It annoys me having used Unix in college and now working on the Windows side. What's the history behind this decision? Anyone know why it worked out this way?
jrsconfitto
  • 1,156
110
votes
5 answers

How do I add Python to the Windows PATH?

I want to be able to run Python commands from the Windows CMD. However, if I don't specify Python's full path for each command, I get an error saying "Python is not recognized as an internal or external command, operable program or batch file." How…
davewise
  • 1,203
109
votes
3 answers

Mac OS X: conventional places where binary files should live

I've downloaded an application that is a command-line application, and want to put it somewhere where I can run it from the command-line without having to type the path explicitly. What are the conventional paths used for something like this?…
Jason S
  • 7,944
97
votes
4 answers

Windows 7's PATH and environment variables are corrupted

I have no clue, but lately I've been having this problem. After running my workstation suddenly something destroys PATH and lots of stuff stops working. Initially, my path had MANY directories listed (I use Windows 7 as a development box) and after…
Pavel P
  • 2,138
90
votes
4 answers

How to set path for sudo commands

If I issue sudo my-command how does Linux look for that my-command? The my-command is in my PATH. I can invoke it without any problem. However, when I invoke it with sudo, I'll get command not found. How to overcome it? EDIT: That "Possible…
xpt
  • 9,385
  • 44
  • 120
  • 178
82
votes
8 answers

Using relative paths for Windows shortcuts

I have a folder scheme like (highly simplified version): New Files >Tools >Scripts Tested Files >Tools >Scripts ... and I'd like to have a shortcut in each folder from the "New Files" child folders, to the "Tested Files" child folder. But this…
82
votes
2 answers

Path Environment Variable Windows 10. Echo %Path% on command prompt shows only %Path%

My variable value in path is as follows C:\ProgramData\Oracle\Java\javapath;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Skype\Phone\;C:\Program…
Arun S
  • 929
79
votes
5 answers

How can I display the absolute path in bash prompt?

I currently have my bash PS1 set to something like this: PS1="\[\`if [[ \$? = "0" ]]; then echo '\e[32m\h\e[0m'; else echo '\e[31m\h\e[0m' ; fi\`:\w\n\$ " How can I make it show the absolute path instead of the relative one (e.g. /home/dave/dir…
David B
  • 2,614
1
2 3
84 85