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.

1236 questions
405
votes
5 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
  • 223,558
  • 70
  • 607
  • 592
294
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,625
  • 13
  • 44
  • 75
208
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,219
  • 3
  • 16
  • 6
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.
Second Person Shooter
  • 2,229
  • 2
  • 17
  • 17
168
votes
22 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
  • 27,333
  • 17
  • 78
  • 105
153
votes
4 answers

which/whereis differences

What's the difference between which and whereis ?
mk12
  • 3,132
  • 5
  • 29
  • 34
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
  • 14,554
  • 30
  • 70
  • 82
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
  • 2
  • 9
  • 5
106
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,006
  • 3
  • 9
  • 16
102
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,503
  • 16
  • 60
  • 79
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
  • 1,948
  • 2
  • 18
  • 24
77
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
  • 8,261
  • 38
  • 102
  • 156
75
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…
Gary Morris
  • 861
  • 1
  • 7
  • 5
71
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,454
  • 7
  • 27
  • 33
71
votes
5 answers

Why is . not in the path by default?

On UNIX-like systems over the years (most relevantly to me, Linux), I've noticed that . (current dir) is never in the $PATH by default. Why is this? I recall reading years ago that it was a security problem, but the article I read didn't explain…
dirtside
  • 1,041
  • 2
  • 12
  • 15
1
2 3
82 83