PATH (all upper case) is the name of an environment variable on Unix-like operating systems, DOS, OS/2, and Microsoft Windows, specifying a set of directories where executable programs are searched for.

learn more… | top users | synonyms

3
votes
3answers
324 views

Why can't I call this program using its full path?

I am trying to build a command line wrapper in Python 3 for an exiting command line tool called spooky and I am having a hard time understanding some strange behavior. If I type spooky on the command ...
2
votes
0answers
113 views

Why is my PATH not listed in my .bashrc file? [duplicate]

Possible Duplicate: Is it possible to find out which files are setting/adding to environment variables, and their order of precedence? I am a Linux novice. I would like to edit my PATH ...
0
votes
2answers
2k views
8
votes
1answer
967 views

How to run my own program without specifying its path

Let's suppose I have compiled something and I run it like so: $ /path/to/my/executable/mycmd Hello World What do I need to do to run it like $ mycmd Hello World from everywhere in my computer? ...
8
votes
1answer
991 views

Where have I set my bash PATH?

I want to remove ~/bin from my PATH.  I set it up months ago when Linux (Ubuntu) was very new to me, but I don't know how I added it... Nothing shows up when I search all the files listed below. ...
9
votes
5answers
2k views

Refer to a file under the same directory of a script found in $PATH

I have a bash script file, which is put under some directory added to $PATH so that I can call the script from any directory. There is another text file under the same directory as the script. I ...
5
votes
2answers
3k views

How can I set all subdirectories of a directory into $PATH?

It looks like when adding a directory into $PATH, its subdirectories are not added recursively. So can I do that? Or is there a reason why this is not supported?
1
vote
3answers
566 views

How to determine which executable on my path will be run?

I run which and get the following, brendan$ which python /opt/local/bin/python brendan$ which -a python /opt/local/bin/python /usr/bin/python brendan$ ls -l /opt/local/bin/python lrwxr-xr-x ...
3
votes
7answers
249 views

“which” with a little “grep”-like solution?

# which mkdir /bin/mkdir # which mkdi # How can I get the path of the e.g.: "mkdir"'s binary without knowing the name of the binary file? (command). So that which "mkdi" would output the ...
1
vote
1answer
2k views

Help with installation of ROOT, PATH variable is getting deleted

I am trying to install ROOT which I need for work. I run Ubuntu 10.04 64 bit on virtualbox on my laptop. After extracting the tarball, I try to source the .sh file using the command as suggested in ...
4
votes
2answers
2k views

Problem with $PATH and executable file

I am a complete unix noob so please forgive my simple question. I have a unix executable file located in a directory I generated. I believe I need to get this directory in my $PATH so that the unix ...
2
votes
2answers
241 views

Software (SciTe) runs differently when opened from Terminal Vs GUI

When I open SciTe from the terminal everything works fine. When I open it via Ubuntu 10.04 GUI drop down boxes I get this error every time I try to run a ruby program: sh: ruby: not found At this ...
18
votes
3answers
6k views

Duplicate entries in $PATH a problem?

I source bashrc's of few of my friends. So I end up having duplicate entries in my $PATH variable. I am not sure if that is the problem for commands taking long to start. How does $PATH internally ...
2
votes
2answers
5k views

Multiple path environment variable setup lines with bash

I have very long export PATH=A:B:C .... Can I make a multiple lines to have more organized one as follows? export PATH = A: B: C:
4
votes
2answers
619 views

What does '//' mean in return from `which`

I have an executable script test under the full path /home/sawa/foo/bar/test. The directory /home/sawa/foo/bar is within $PATH, and has priority over the default ones including /usr/bin. When I do ...
1
vote
1answer
525 views

Execute a command in a different path

When using Git VCS, I execute all of the git commands on the directory that contains a .git repository. I want to execute a git-pull through an SSH trigger but how do I define the path to the ...
19
votes
5answers
772 views

shebang and path

Why does a shebang need a path? Wrong #!ruby Correct #!/usr/local/bin/ruby #!/usr/bin/env ruby The operating system should have the information regarding the path for a registered command, and ...
6
votes
2answers
1k views

Which is the best practice when replacing a system binary?

I'm working on Mac OS X which is shipped with several binaries mostly located in /usr/bin/ and /usr/sbin/. Since it doesn't have a native package manager like some Linux distros, I got used to ...
4
votes
3answers
7k views

Adding directory to PATH through Makefile

I'm having some trouble in exporting the PATH I've modified inside the Makefile into the current Terminal. I'm trying to add to the PATH, the bin folder inside wherever the Makefile directory is. ...
2
votes
1answer
802 views

Find the DVD-ROM path in FreeBSD

I do not know the path of my DVD-ROM and also my external hard drive to mount them in FreeBSD using the mount command. What command should I use to find their path?
2
votes
5answers
871 views

Unix install best practices, append to path or link through

I have some software I am about to ship (gradschool project) and I want to know on a unix machine what the best practices are for installing software. I originally linked through /usr/local/bin my ...
6
votes
3answers
3k views

How to run a script from another path, and know the script's path?

I need to run a script that access a file in the same path it is located. For example: I have the script in /home/me/folder/script.sh, and this script will access the file /home/me/folder/myfile. As ...
2
votes
2answers
395 views

What could cause which to not show something in the path?

There is an executable in my path that I believe is a perl script. >$scriptname $outputofscript but >which $scriptname which: 0652-141 There is no $scriptname in $path and the path it ...
9
votes
4answers
247 views

`which`, but all

I think most are familiar with the which command, and I use it frequently. I just ran into a situation where I'm curious not just which command is first in my path, but how many and where all the ...
7
votes
5answers
7k views

Find absolute path from a script

In a script I get in $0 the possible relative path to it. For converting it to absolute I've found this solution which I don't understand: abspath=$(cd ${0%/*} && echo $PWD/${0##*/}) My ...
8
votes
5answers
3k views

Find a file in the path without “which”?

I am (somehow) able to run a script: $ assemble.sh file ... [output] But which can't find it: $ which assemble.sh which: no assemble.sh in ...
3
votes
1answer
1k views

ps command not giving output in home directory

I am logging into a solaris server, switching to bash, then switching to another user "sruser" and switching to bash. /home/batch/sruser/ is the home directory of the user "sruser". The issue is ps ...
0
votes
2answers
2k views

installed java, but java -version not showing new java

I just installed jdk1.6.0. I have tried multiple ways to set the path variable and make java 1.6 my new running version. And nothing is working. Running centos5 virtual machine. alternatives --config ...
14
votes
4answers
796 views

keep duplicates out of $PATH on source

I have the following code that's source-d by my .shellrc PATH="${PATH}:${HOME}/perl5/bin" PATH="${PATH}:${HOME}/.bin" export PATH but if I make changes to other code and then source this file, my ...
13
votes
3answers
2k views

Share aliases and PATH setting between zsh and bash

The shell that I normally use is zsh. I have several aliases to enable color in some programs such as ls and grep. I've also set my custom path so that I can execute programs in non-standard place ...
2
votes
1answer
1k views

temporary setting the path in an “init” file

I have an "init" file that reads #!/bin/sh export PATH=$PATH:/home/me/morph_numsys/software/bin by which I'd just like to set the path to that folder for only this bash session. However, when I ...
5
votes
2answers
513 views

modify path globally

Is there a standard for $PATH and the order of things that are supposed to be in there? out of the box Arch Linux doesn't have /usr/local/bin in the $PATH. I want to add it but I'm not sure if there's ...