Skip to main content

All Questions

Tagged with
5 votes
2 answers
9k views

How to fix bash looking for a program in the wrong dir (Issues setting up NPM on Ubuntu 11.10)

This time I ran the "trusting" install script curl http://npmjs.org/install.sh | sudo sh from the dir /. $ which npm /usr/local/bin/npm $ npm bash: /home/steven/local/bin/npm: No such file or ...
Steven Lu's user avatar
  • 2,312
2 votes
0 answers
133 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 (which I ...
Andrew's user avatar
  • 17.1k
10 votes
1 answer
5k 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. ...
Peter.O's user avatar
  • 33.1k
56 votes
7 answers
48k 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 ...
Tim's user avatar
  • 103k
4 votes
8 answers
302 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 /bin/mkdir too.
LanceBaynes's user avatar
  • 40.6k
80 votes
6 answers
50k views

Duplicate entries in $PATH a problem?

I source the bashrc's of a few of my friends. So I end up having duplicate entries in my $PATH variable. I am not sure if that is causing commands to take a really long time to start. How does $PATH ...
balki's user avatar
  • 4,457
16 votes
3 answers
52k 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:
prosseek's user avatar
  • 8,598
11 votes
5 answers
17k 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 ...
maaartinus's user avatar
  • 5,119
2 votes
3 answers
3k views

Bash: why isn't "set" behaving like I expect it to?

I have observed that only the values of exported variables are appended to the my PATH variable via my Mac OS X .bash_profile. Whereas, the values of locally set variables cannot. Why can't local ...
seasonedgeek's user avatar
18 votes
5 answers
10k 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 (/s/std/bin:/usr/afsws/bin:/opt/SUNWspro/bin:/usr/ccs/bin:/...
Xodarap's user avatar
  • 3,703
25 votes
4 answers
15k 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 (...
phunehehe's user avatar
  • 20.3k

15 30 50 per page
1 2 3 4 5
6