An environment variable on Unix-like operating systems, DOS, OS/2, and Microsoft Windows, specifying a set of directories where executable programs are located
0
votes
4answers
31 views
find command: how to ignore pathname?
I have to find some type of files in a directory and it's subdirectories and I only have to print out the filenames.
So here's the main command:
find -type f -name "*.c"
Now, how could I cut the ...
1
vote
2answers
68 views
Executable located in location A how to run it in location B?
So, I've an executable in my debian server and this executable located in /home/human/ExecuteIt, still i cant figure it out how to run my executable in another location. In my case it is ...
5
votes
2answers
59 views
awk + paste for cleaning up PATH?
I have seen this code in .cshrc init files on a few machines. I went through a few awk tutorials in trying to understand how it works, but I am still unable to decrypt it.
setenv PATH `echo $PATH | ...
3
votes
1answer
42 views
Script not getting executed as per expectation
I have two Perl scripts at a predefined location in Unix. This predefined location is set in path variable ($PATH). Now when i try to run first script (from any location) the script runs successfully ...
0
votes
1answer
36 views
How to manually install a cpp library
I want to install the opengl sdk http://glsdk.sourceforge.net/docs/html/pg_build.html . I successfully built it but it has no install script.
I am wondering where I have to put them in order for ...
1
vote
4answers
36 views
Ambiguously named executables
It appears that in tcsh if I have ambiguously named executables in two separate folders in the $PATH it directs to the one in the most recently created folder. Am I correct? And is this always true?
...
2
votes
1answer
173 views
Make problem with includes
I am installing imagick-v3.1.0RC2 package on CentOS 5.5. I have ImageMagick 6.7.9-9 installed as well and have a problem on the make step.
Problem is that its cannot find included file:
...
0
votes
0answers
29 views
Installing required libs/frameworks/packages for compilation on OSX
I'm trying to compile SmartSim for OSX Lion, and at the moment I'm at the ./configure stage.
Here is a dump of what I've managed to get so far:
$ ./configure
checking for a BSD-compatible install... ...
15
votes
9answers
938 views
Remove duplicate $PATH entries with awk command
I am trying to write a bash shell function that will allow me to remove duplicate copies of directories from my path environment.
I was told that it is possible to achieve this with a one line ...
5
votes
4answers
2k views
Adding paths to PATH using a multi-line syntax
As far as I understand, the usual way to add a path to the PATH environment variable is by concatenating paths separated by the : character.
For example, if I want to add three paths to it ...
2
votes
1answer
26 views
How to change which program is executed by default
Surely this is an easy question, that I just don't know how to search for, but if I have two identically named executable files, one in /usr and one in /usr/local (for example), how can I change which ...
5
votes
3answers
190 views
Is there a way to add a directory to my PATH in zsh only if it's not already present?
Is there an easy way in zsh to add a directory to my PATH only if it's not already present? (or, more generally, any environment variable). I've tried:
PATH+=/my/directory
... but if that's ...
3
votes
1answer
474 views
Global /etc/profile setenv or export overwriting user settings in .profile
I need to call a modified version of a program in /home/user_name/bin rather than the (older) version in /opt/program_name/current on a CentOS 5.3 cluster. The program creates a tcsh script using ...
-2
votes
1answer
50 views
Paths in my bash profile do not work!
export PATH=/usr/local/bin:/Users/rodrigoprugue/Desktop/CRUNCH:~/phreeqc/bin:$PATH
export PARFLOW_DIR=~/parflow/parflow.r605/
export SILO_DIR=~/parflow/silo-4.7.2/
export ...
3
votes
2answers
47 views
/etc/ld.so.conf doesn't contain /usr/lib
I am using pkg-config to help supply the correct libs during c++ compilation. As I understand it, it searches in directories supplied by /etc/ld.so.conf. My ld.so.conf references the following lib ...
2
votes
1answer
60 views
Find out where $PATH got corrupted
I'm using OSX Mountain Lion 10.8.2
$echo $PATH prints this:
/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/Users/myusername/.rvm/bin
I've commented out everything in ~/.bash_profile ...
5
votes
5answers
4k 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 ...
2
votes
2answers
29 views
PATH work with relative directories
I'm trying to get a program to work that isn't in my distro's package manager. It doesn't provide a makefile or sources, just binaries. If I copy the whole folder to /usr/local and then add that to ...
8
votes
4answers
240 views
Why does the “which” command give duplicate results?
which -a ruby gives me
/usr/ruby
/usr/ruby
/usr/ruby
It gives the same path three times. Why does this happen?
1
vote
3answers
60 views
Decomposition of path specs into longest-common-prefix + suffix
Given any two absolute Unix path specs1, one could decompose each spec as the concatenation of a longest common prefix and a specific suffix. E.g.,
/abc/bcd/cdf -> /abc/bcd + cdf
...
4
votes
2answers
188 views
Is it safe to add . to my PATH? How come?
I've seen people mention in other answers that it's a bad idea to include the current working directory ('.') in your $PATH environment variable, but haven't been able to find a question specifically ...
2
votes
3answers
126 views
How to make GNU grep the default in FreeBSD?
I'm running FreeBSD 9.1-RELEASE. I've installed GNU grep with portmaster textproc/gnugrep.
However the "default" grep for users is still FreeBSD grep.
# /usr/local/bin/grep -V
/usr/local/bin/grep ...
3
votes
2answers
56 views
Add directory to path for all shells and users in SLES 11.1
I'm using a server running Suse Enterprise 11.1. I need to add some locations to the path for all users and for all the shells. Is there a nice and easy way to do this or do I have to modify the ...
1
vote
3answers
102 views
Cannot find lib in path
I am trying to start a program that relies on some libraries that are in my path, however, the program says it cannot find the files:
11:45:27 ~ > echo $PATH
...
2
votes
2answers
49 views
Why does “User Contributed Perl Documentation” show up when I look for 'man' pages
When I
man -f <some string>
in addition to the expected Unix man pages, I get a bunch of odd looking entries that all have the header "User Contributed Perl Documentation". For example
man ...
2
votes
1answer
66 views
How is the path to search for 'man' pages set?
I'm puzzled by how the path used for finding man pages is set. The "right thing" seems to happen magically. For example, if change my PATH from
...
1
vote
0answers
23 views
How do the various configuration files determine MANPATH on Darwin?
On Darwin (12.2.0, OS X 10.8.2, bash 3.2.48(1)) my MANPATH appears to be determined by my PATH rather than by the various configuration files associated with man and the man path, /etc/manpaths, ...
4
votes
2answers
262 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 ...
5
votes
1answer
63 views
Correct handling of Python2 and Python3
What is the correct way running scripts that depend on python2.x but on a system where python3.x is aliased with python.
The solution should take into account the following things :
Python2 ...
8
votes
3answers
163 views
Running an executable in PATH with the same name as an existing function
Sometimes I define a function that shadows an executable and tweaks its arguments or output. So the function has the same name as the executable, and I need a way how to run the executable from the ...
0
votes
1answer
129 views
Add USB space in conky
I'm setting conky and I'd like to add the usb space, I use:
$font${color DimGray}/ $alignc ${fs_used /} / ${fs_size /} $alignr ${fs_free_perc /}%
${fs_bar /}
for the full hdd, what should I write ...
2
votes
2answers
34 views
Applying and linking all settings/binaries of one user to another user in Linux
In a linux machine, we may have to compile our programs with respect to that linux machine.
Now, if we already have some other users (not root. A typical user.) who have already compiled many ...
1
vote
1answer
288 views
Wallpapers' s folder in XFCE4
I've just installed XFCE4 on Arch Linux, now I'd like to add an image in the wallpaper folder, someone know the full path. I'm searching, but I haven't found yet.
3
votes
4answers
360 views
List all files / binaries in current PATH
Is there an "easy" way of running an "ls -la" style command for listing all files / executable binaries in the current PATH?
(I intend to pipe the output into grep, for looking for commands with ...
6
votes
1answer
136 views
What's the difference between “command directory” and “command directory/”? [duplicate]
Possible Duplicate:
When should I use a trailing slash on a directory?
Does the slash make any difference?
5
votes
3answers
228 views
Create a command for a Linux executable file
I'm using a program called node-webkit, but I can't start the program without specifying the full path to the executable file. Is there any way to associate a command (such as node-webkit) with an ...
1
vote
0answers
193 views
How to install Ruby Test to Sublime Text 2
I am quite new to Ubuntu, so I am running into some problems.
I was following this tutorial to install Ruby Tests for Sublime Text 2: https://github.com/maltize/sublime-text-2-ruby-tests
There is ...
1
vote
1answer
131 views
Can I get correct $PATH when executing sudo -u db2inst -sh “db2”?
I need to run sudo -u db2inst1 sh -c "db2 connect to db; db2 set schema Edumate; db2 \"select * from edumate_settings\"" but I don't want to specify absolute path to db2
If I run sudo -u db2inst1 sh ...
2
votes
3answers
279 views
Added bin directory to my path, can't execute commands in it with 'sudo command'
I made a bin directory in my home folder where I place all my scripts. Then in my .bashrc I added the following:
export PATH=$PATH:/home/myusername/bin
So I could access files I placed in there ...
1
vote
2answers
309 views
How to add a path to system $PATH for all users's non-login shell and login shell on debian
I install some programs in /opt/my-program/bin, I want to add /opt/my-program/bin to system $PATH for all users's non-login shell and login shell. What should I do?
Change /etc/environment is OK for ...
4
votes
2answers
165 views
Inhibit Variable Expansion in Paths
How do I prevent Zshell (and Bash I assume) from expanding environment variables in paths be completed as shown in the following example:
$PREFIX/alt/li
should expand to
$PREFIX/alt/lib
and not ...
4
votes
2answers
588 views
Change user and load entire environment in shell script
I'm having some trouble with an upstart script of ours that changes user and starts up a few ruby daemon processes.
In the past i would simply bash -c "do the business" -l someuser making sure to use ...
5
votes
3answers
257 views
My `which` command may be wrong (sometimes)?
I've compiled the last emacs version from the source code (v24.2) because the version installed on my machine is (quite) old for me (v21.3). I've done the usual:
$configure --prefix=$HOME
make
make ...
1
vote
1answer
276 views
How to force a particular version of Java?
I am on a RHEL 5.5 64 bit box. The systems engineer installed the 64-bit Java VM under /usr/bin ; however, I needed a 32 bit VM which he installed in /opt/jdk1.6.0_35. But now, everytime I do java ...
2
votes
3answers
787 views
How to add a path to system $PATH for all users's non-login shell for debian
I install some programs in /opt/xxx/bin, I want to add /opt/xxx/bin to system $PATH for all users's non-login shell. What should I do?
2
votes
1answer
412 views
update PATH variable in .bashrc using sed
I've been trying to update my PATH variable permanently by putting it in my .bashrc file. However, I don't want to just append it to the file, but rather replace the current PATH=........ with the ...
2
votes
2answers
2k views
How to export LD_LIBRARY_PATH to all users and system services
I want to export LD_LIBRARY_PATH to system services and all users.
System services are run before login, so .bashrc is not applicable.
How to achieve this?
3
votes
2answers
3k views
How to add home directory path to be discovered by Unix which command?
I have installed node.js at custom location and added the location to the $PATH in .profile file.
Hoons-MacBook-Air:npm Eonil$ node --version
v0.6.2
Hoons-MacBook-Air:npm Eonil$ which node
...
6
votes
2answers
440 views
Why Bash unable to find command even if $PATH is specified properly?
I am specifying path to my command in the file /etc/profile:
export PATH=$PATH:/usr/app/cpn/bin
My command is located in:
$ which ydisplay
/usr/app/cpn/bin/ydisplay
So, when I performing "echo ...
3
votes
2answers
151 views
open a file using CDPATH and symlink
To quickly move around, I added a path to CDPATH that contains symlinks to different locations. I did this by adding the following line to .bashrc:
export CDPATH=~/symlinks
When working with ...



