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 ...

learn more… | top users | synonyms

135
votes
6answers
147k views

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 ...
103
votes
9answers
112k views

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

I type echo $PATH on the command line and get ...
57
votes
8answers
13k views

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 ...
52
votes
1answer
1k views

How is a program that's not in my path being run? [duplicate]

Possible Duplicate: Why am I able to execute a program that is not in my PATH environment variable? I was teaching a coworker about %PATH% and found that if I run "Firefox", it works, but ...
51
votes
12answers
16k views

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 ...
45
votes
2answers
22k views

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?
41
votes
3answers
14k views

What is the longest file path that Windows can handle?

What is the longest file path that Windows can handle?
39
votes
7answers
73k views

Using cd Command in Windows Command Line, Can't Navigate to D:\

This may be a stupid 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 ...
32
votes
3answers
4k views

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 ...
24
votes
4answers
17k views

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 ...
19
votes
4answers
17k views

Restoring Windows XP PATH variable

I installed an application that screwed my PATH variable. Now I cannot run anything from the command prompt. Is there any way I can restore PATH variable?
19
votes
4answers
7k views

which/whereis differences

What's the difference between which and whereis ?
18
votes
3answers
5k views

Best practice for Windows PATH/environment variables managing?

Right now, it's such a mess. Every time I install a new program that does something trivial in the command line, I have to add it to the path. In fact, I'm developing on Ruby and even gems ...
16
votes
2answers
24k views

Can I change the PATH environmental variable in Windows 7 without restarting?

Is there anyway to change the PATH environment variable (or variables in general) on Windows 7 Exterprise (64 bit) and have it take effect in PowerShell or the command prompt (cmd.exe) without ...
13
votes
4answers
9k views

How to start/open a file/folder that contains space in its name through command-line?

I'm trying to use the start command in the command prompt to open files and folders, but I'm unable to open files and folders that contain space(s) in their name. I have tried the following queries ...
13
votes
3answers
43k views

How to globally modify the default PYTHONPATH (sys.path)?

On a Ubuntu (10.10) system, I have a Python package that installs itself into /usr/local/lib/python2.6/site-packages/. This isn't contained in the default path (sys.path). How do I add this directory ...
13
votes
2answers
15k views

Environment variables in bash_profile or bashrc?

I have found this question [blog]: Difference between .bashrc and .bash_profile very useful but after seeing the most voted answer (very good by the way) I have further questions. Towards the end of ...
12
votes
4answers
13k views

How To Add Python to the Windows Path

How do I add python to the windows PATH permanently?
12
votes
3answers
8k views

Mac OSX: conventional places where binary files should live

I'm only vaguely familiar with Unix and the filesystem convention for Macs, so sorry if this is a dumb/easy question. I've downloaded an application that is a command-line application, and want to ...
10
votes
5answers
444 views

What's the difference between filename and ./filename in Linux

What is the difference between filename and ./filename? Under what circumstances is one preferred to the other?
10
votes
2answers
7k views

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 ...
10
votes
5answers
6k views

Adding an .exe to default path without adding the directory

For example, I want to add notepad++ to my PATH, however the directory also contains uninstall.exe and several other files/executables and I don't want them to "pollute" my path. Can I just add the ...
10
votes
1answer
19k views

How to permanently add current directory to PATH in Linux? [duplicate]

Possible Duplicate: Add folder to PATH I want to a add a directory to my bash to search in, and I am using the $PATH=.... it works however when I open a new command window it is not there. ...
9
votes
6answers
10k views

Can I add a shortcut to replace a path in Linux?

For example, I always go to this path: /user/something/somefolders/somewhere but I don't want to type cd /user/something/somefolders/somewhere in the terminal all the time, can I have ...
9
votes
4answers
46k views

How do I extend the maximum file path size in Windows 7? [duplicate]

Possible Duplicate: What is the longest file path that Windows can handle? Does anybody know if it is possible to extend the maximum path length in Windows 7 (64-bit)?
9
votes
8answers
5k views

$PATH in Vim doesn't match Terminal

I'm using MacVim and when I don't launch it from the Terminal (mvim) its $PATH does not include what I have set in my .bash_profile. It only seems to have the default values, ...
9
votes
4answers
66k views

Easier way to change environment variables in Windows 8? [duplicate]

Possible Duplicate: What are PATH and other environment variables, and how can I set or use them? I know that I can edit my environment variables in windows 8 by going to Start -> All ...
9
votes
6answers
11k views

PATH env variable on Mac OS X and/or Eclipse

When I print out the path in bash, it prints this: /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin When I run System.out.println(System.getenv("PATH")); in Java running under Eclipse, it ...
9
votes
5answers
39k views

Different PATH environment variable for 32bit and 64bit Windows - is it possible?

Is it possible to have whole or part of PATH environment variable specific to the type of running process's image (32bit/64bit)? When I run some app from within 64bit cmd.exe I would like to have it ...
9
votes
4answers
12k views

Passing PATH through sudo

In short: how to make sudo not to flush PATH everytime? I have some websites deployed on my server (Debian testing) written with Ruby on Rails. I use Mongrel+Nginx to host them, but there is one ...
9
votes
4answers
3k views

$PATH is driving me nuts

OK, apologies if this is something dumb, but I'm running out of ideas. Goal: prepend /usr/local/bin to $PATH Problem: $PATH won't do what I want or expect How I got here: I want to start learning ...
9
votes
1answer
16k views

Windows 7 - User-specific %PATH%

I'd like to set up a system for Windows 7 where each user has their own private directory in %PATH%. I tried setting %PATH% to %HOMEDRIVE%%HOMEPATH%\Bin;%SystemRoot%\System32;[...] but it doesn't ...
8
votes
2answers
11k views

How can I set user environmental variables (such as PATH) from a non-administrator account on Windows 7

How can I set user environmental variables (such as PATH) from a non-administrator account on Windows 7? On Windows XP I could go into the Advanced Settings in the System Control panel. However, on ...
8
votes
1answer
587 views

Cannot delete folder - Content seems to be nested recursively

I cannot delete a folder located on my hard disk by any means. I don't quite know how it was created, all I know is, that it is a pretty deep structure of folders (too deep to delete it at once, ...
8
votes
1answer
10k views

How to get relative path from two absolute paths in linux shell?

We have two paths. First one is directory, second either dir or file. /a/b/c and /a/d/e.txt Relative path from first path to second will be: ../../d/e.txt How to get it in linux terminal? PS: For ...
7
votes
4answers
174 views

What is the difference between ./ and ../?

when we specify the file path some times we specify like ./filename and some time ../filename what is difference between these two?
7
votes
3answers
7k views

adding PATH with SETX or PATHMAN or something else?

I am trying to add a PATH from command line, as with SETX %PATH%... it always expands the PATH, which I don't want. PATHMAN is exactly for this purpose, but it doesn't work for me on Windows 7. It ...
7
votes
1answer
2k views

What is the “/.vol” directory for?

In Mac OS X, what is the /.vol directory for? I noticed that Excel usually reverences files (while investigating in instruments) using a /.vol path. Is it a folder for temporary files, or does it ...
7
votes
2answers
3k views

Why are changes to my PATH not being recognised?

When I update my PATH using either the built-in Environment Variables dialog, or something like Path Editor, and then open up a command-prompt, the changes to my PATH will not register with the ...
7
votes
2answers
3k views

How can I print full path of an executable command in Windows?

At the moment when trying to run tf command and/or any other run-able command, I need to open Visual Studio Command to get it executable. I like to use the normal console and/or the alternative ...
7
votes
1answer
2k views

“whereis” and “which” return different paths in Mac OS X

I've got the default OpenSSL 9.8 (Mac OS X 10.6.8) and decided to install the newest version (1.0.1) via MacPorts (sudo port install openssl). These are console output of which and whereis commands: ...
7
votes
2answers
4k views

find command doesn't seem to work in cygwin

When trying to run find commands in cygwin, I keep getting the error "FIND: Parameter format not correct" However, the same commands run on linux. What's going on?
7
votes
5answers
20k views

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 ...
7
votes
5answers
2k views

Clipboard: Copy image, get path back when pasting in file input

First question here on superuser. I sometimes get ad-hoc bug reports from customers, which I need to transfer to our online bug tracker. Works fine for text, but pictures are tedious. I'm looking ...
7
votes
4answers
18k views

What is the path for JDK on Windows 7 64-bit?

When I work with the JDK, it says that javac is not recognized as an internal or external command. What shall I do? What is the path for jdk1.6.0_21?
6
votes
4answers
8k views

What is the difference between forward slashes and backslashes in paths? [duplicate]

Possible Duplicate: Why does Windows use backslashes for paths and Unix forward slashes? What is the main difference between forward slash (/) and backslash (\) in reference to paths, both ...
6
votes
3answers
16k views

“sudo: port: command not found” after installing MacPorts on Snow leopard

I have attempted to install MacPorts in order to upgrade my Rails version so that I can work my way through Agile Web Development with Rails, PragProg (4th, 2011). I have followed the directions in ...
6
votes
2answers
546 views

What is the technical term for current (.) and parent (..) directory?

I got a function that checks whether the passed in file name is . or ... But I don't know how to name it properly. Something like IsCurrentOrParentDirectory() is ambiguous, since the function takes a ...
6
votes
3answers
5k views

Mac OS X Lion: What are invalid characters for a file name?

I am having trouble finding this information, and trial and error is telling me that there may not be any. So I figured I ask the community to see if anyone knows and can point me to a apple page that ...
6
votes
2answers
675 views

Potential issues with adding /usr/local/[s]bin to root's path?

I've noticed that the root account $PATH does not include /usr/local/bin or /usr/local/sbin by default. Are there any potential issues that could arise from adding those directories to the path? If ...