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.

1163 questions
389
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
  • 209,610
  • 62
  • 564
  • 561
281
votes
10 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,445
  • 11
  • 42
  • 75
207
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,209
  • 3
  • 16
  • 6
172
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.
xport
  • 2,125
  • 2
  • 16
  • 15
152
votes
21 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
  • 25,888
  • 16
  • 76
  • 105
144
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
  • 13,604
  • 30
  • 68
  • 82
140
votes
4 answers

which/whereis differences

What's the difference between which and whereis ?
mk12
  • 2,882
  • 5
  • 26
  • 34
106
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,163
  • 2
  • 8
  • 5
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,858
  • 2
  • 17
  • 24
96
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
  • 906
  • 2
  • 8
  • 16
88
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
  • 6,952
  • 14
  • 57
  • 79
68
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,011
  • 2
  • 12
  • 15
67
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
  • 781
  • 1
  • 6
  • 5
64
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,254
  • 6
  • 25
  • 32
60
votes
4 answers

Avoid unwanted path in Zip file

I'm making a shell script to package some files. I'm zipping a directory like this: zip -r /Users/me/development/something/out.zip /Users/me/development/something/folder/ The problem is that the resultant out.zip archive has the entire file path in…
jerwood
  • 1,317
  • 2
  • 11
  • 16
1
2 3
77 78