1
vote
1answer
20 views

realpath (GNU coreutils 8.22) does resolve “.” symlink regardless of “-s”

I'm trying to use realpath in a script which has to ensure that it is located under a certain (possibly symlinked) path. Also the script has to be runnable from any location, so it cannot presume that ...
0
votes
0answers
26 views

Vagrantfile - is rvm in ~/.rvm/scripts/rvm or ~/.rvm/bin/rvm?

I'm still learning my way around some of the more hidden files in terminal and I was trying to setup a Vagrant box with rails via shell script provisioning, with some help from these links: ...
0
votes
1answer
21 views

Should I put local/custom directories first or last on my path? [closed]

If I (a regular user) have, for example a ~/bin, with executables in it, should that go first or last on my PATH? why? Is there a standard/conventional approach under Linux? This question ...
1
vote
1answer
111 views

zsh running a comand but not from the path

My zsh is doing something odd, it is running an executable that is not the first executable on my path. I have a wrapper script for ssh but the wrapper is not being invoked while the real ssh binary ...
2
votes
3answers
97 views

How do I prevent $PATH from resetting itself each time?

I'm having difficulty setting up the PATH on my macbook pro. I followed this link to modify my path variable. Each time I start a new terminal I get a PATH pointing towards ...
0
votes
1answer
189 views

Executable not found although in PATH

My $PATH is set to a lot of directories including ~/bin and ~/target/bin I want to execute script.sh which is in ~/target/bin but I get the error bash: ~/bin/script.sh: No such file or directory ...
0
votes
2answers
249 views

How to permanently reset my $PATH?

I was trying to add something to $PATH and it went totally wrong. I now can't run any commands such as ls. I've looked at this answer ...
2
votes
1answer
164 views

Installing Ruby 1.9.3 OSX 10.7.4 breaks after altering PATH

I was having trouble installing ruby 1.9.3-p194 from ruby 1.8.7 on my mac osx 10.7.4. I have was trying to fix my homebrew after running "brew doctor" and got the message of "/usr/bin occurs before ...
0
votes
1answer
59 views

Macos default paths prepend my defined paths in vim

I am trying to call some shell command from vim with like :!ls command. But unfortunately there are some default PATHS that prepends PATHs defined in the original shell. Here is the echo $PATH output ...
1
vote
2answers
417 views

is there an 'upwards' find?

I found I asked this question on the wrong stackexchange site. To find files starting from a certain path, I can use find <path> .... If I want to find 'upwards', i.e. in the parent directory, ...
6
votes
2answers
670 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 ...
0
votes
4answers
458 views

Changing $PATH variable

I used this to add to PATH: APXS2=/usr/local/apache/bin/apxs PATH=$PATH:/usr/local/apache/bin passenger-install-apache2-module and my PATH now looks like this: ...
1
vote
2answers
149 views

Forcing an Absolute path where a relative path is expected

I have a program that takes a relative path as input appends it to a some path string to get the actual path. Now all I can input is the relative path. So if I want to go one level above my input ...
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 ...
10
votes
5answers
442 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?
1
vote
2answers
409 views

Symlinks are inaccessible by their full path on OS X

I have symlinks pointing to applications placed in /usr/local/bin which is in the path. However, I can't run these applications from other folders. Even more weird, I can't access them by the full ...
4
votes
4answers
2k views

How do I “globalize” binaries in Linux?

For example, any binary placed in /usr/local/bin will run in any location. If I were to place binaries inside /myname/local/bin how would I be able to accomplish the same thing?
3
votes
4answers
916 views

Is there a way I can use $PATH as defined by my bash profile?

I spend most of my day ssh'd into servers. I have a series of aliases/functions/scripts that allow me to type p hostname from the terminal and execute GNU screen(1) on the remote side, using the ...
2
votes
2answers
255 views

tips about easy alternative/management of PATH in windows

I come from Linux where I'm used to the fact that most applications install to /usr/bin and my tools I put in ~/bin. This means I rarely need to modify the PATH variable. Since I work as a ...
1
vote
3answers
569 views

Traverse path up and check/set permissions in shell script - how?

In a given shell script I need to take a known path and check it upwards (to the file system root) for correct permissions. How would I split the path and walk upwards in a shell script (can be bash ...
3
votes
3answers
963 views

How to uninstall preinstalled UNIX software on Mac OS X?

Hey i want to uninstall some applications shipped with Mac OS that are a part of UNIX. My plan is to uninstall most of the default stuff to install it via Macports. That would make upgrading, ...
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 ...