I install custom software in /usr/local/lib
. How do I set the PATH and LD_LIBRARY_PATH in CentOS 6 system-wide to use /usr/local/lib
. I realize there may be more than one way. What's the simplest and most standard way?
I use %0
in batch file to get the containing directory of the batch file but the result is :-
c:\folder1\folder2\batch.bat
I want just directory, without batch file name, like this :-
c:\folder1\folder2\
How can I do it? Maybe I should filter the path. If yes, how can I do it?
We just got our new server(s) up and we're running CentOS on them all. After successfully installing Ruby Enterprise Edition, I would now like to add the REE /bin
(located at /usr/lib/ruby-enterprise/bin
) directory to make it the default Ruby interpreter on the server.
I have tried the following, which only adds it to the current shell session:
export PATH=/usr/lib/ruby-enterprise/bin:$PATH
What would be the correct approach to permanently adding this directory to $PATH
for all users? I'm currently logged in as root
.
When backing up with rsync, How do I keep the full directory structure?
For example, the remote server is saturn, and I want to backup saturn's /home/udi/files/pictures to a local directory named backup.
I want to have (locally) backup/home/udi/files/pictures rather than backup/pictures.
I'd like to append to the global PATH environment variable on OS X so that all user shells and GUI applications get the same PATH environment.
I know I can append to the path in shell startup scripts, but those settings are not inherited by GUI applications.
The only way I found so far is to redefine the PATH environment variable in /etc/launchd.conf:
setenv PATH /usr/bin:/bin:/usr/sbin:/sbin:/my/path
I couldn't figure out a way to actually append to PATH in launchd.conf
.
I'm a bit worried about this method, but so far this is the only thing that works. Is there a better way?