Setting $PATH for a particular file...????


 
Thread Tools Search this Thread
# 1  
MySQL Setting $PATH for a particular file...????

Smilie dear members;
I am trying to placea directory to keep minor records in particular directories.. rather than just rely on hard links.. I would like to set the $PATH variable so that I can access the directory itself from anywhere; ex./ /tmp or /bin /var...
I know how to export enviromental variables.(i think!)... but this does not seem to do the job ver well ..ex,.
path=`~/dir1/dira1/filesys:~/dir2/dira2/../dirb2/filesys/:etc' EXPORT $PATH...
so far this has not worked.. and i can't seem to imagine how placing the dirctory in ex,. /sbin and creating hard links would work in place of a direct pth export... .
thanx for your ideas moxx68Smilie Smilie
# 2  
Setting the PATH environment variable is for locating commands, not data files. If that is what you are attempting to do (use data files versus running commands) then it will not work.
# 3  
Question will cdpath work..

Smilie did some quick research and found out something to that extent while i was waiting for a reply.. but this text mentioned something about a cdpath in env.. if i set the directory to the cdpath it should do precisely that unless i did'nt undertsand what it was saying.. but I tried this trick with cdpath several months ago and it worked to a certain extent otherwise I can't say that i knew what I was doing.. (first time)... will setting the cdpath work. and do i set the same way as the $PATH (text not very clear)..
thanx moxxx68Smilie
# 4  
I've never used it but find that cdpath will look for the first instance of the directory you are looking for in the path specified - if you have two directories with the same named sub-directory, you will change directory to the first in the list when you may have wanted the second. Consider that when you start using that variable.
# 5  
Smilie thanx moxxx68
 

Previous Thread | Next Thread
Thread Tools Search this Thread
Search this Thread:
Advanced Search

Test Your Knowledge in Computers #764
Difficulty: Medium
A cache miss is a failed attempt to read or write a piece of data in the cache, which results in a main memory access with much shorter latency and increased speed.
True or False?

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Is there any $PATH default setting?

This is a very newbie's question: I was trying to add a new version of the same command "blastn", but the old command always shows up first. which blastn /usr/local/bin/blastnThe two versions of the same command "blastn" are located in: which -a blastn /usr/local/bin/blastn... (5 Replies)
Discussion started by: yifangt
5 Replies

2. Shell Programming and Scripting

Setting path names

I am in a directory called /abstracts Doing tree -d gives . ├── geo1936 │ ├── geo01n01 │ ├── geo01n02 │ └── geo01n03 ├── geo1937 │ ├── geo02n01 │ ├── geo02n02 │ ├── geo02n03 │ └── geo02n04 (4 Replies)
Discussion started by: kristinu
4 Replies

3. Solaris

Setting PATH - Vanishes

Hi , I new to solaris. I want to set path variable . Eg: JAVA_HOME. When i do this, #JAVA_HOME=/usr/jdk/jdk1.6 #export JAVA_HOME #echo $JAVA_HOME /usr/jdk/jdk1.6 Then its ok. When i toggle to bourne shell or if i log off or restart. then JAVA_HOME is echoed blank. How to set... (4 Replies)
Discussion started by: gnanagurus
4 Replies

4. Shell Programming and Scripting

Setting up a path in UNIX

I have the following script "test". When i tried to execute it, I am not able to run it. I dunno why ? Then i tried getting the first few lines of the script which is displayed below: $head -10 test #!/bin/ksh PROG=$0;export PROG ORAUSER=`get_inf_env INFORM_DB_ACCOUNT`;export ORAUSER... (13 Replies)
Discussion started by: bobby1015
13 Replies

5. Solaris

Problem Setting $PATH

I am trying to install the pkg-get package to a fresh install of Solaris 10. I am able to download and install correctly using the default directory for both pkg-get and wget as found on blastwave.org. When I issue the command "which wget and which pkg-get" it returns no wget or pkg-get found in... (1 Reply)
Discussion started by: greengrass
1 Replies

6. Shell Programming and Scripting

Setting path

Hi all, I have a java command in a shell script. When i m executing the command from the prompt its working fine. But when i paste the same command in a shell script and execute the shell script it says path not found. Please help. (5 Replies)
Discussion started by: radhika03
5 Replies

7. UNIX for Dummies Questions & Answers

Help on setting path variable

Hi there, I need help on setting the path variable. How can I set the path variable with Bourne Shell. My scripts goes like this, but did not work. #!/bin/sh PATH=/usr/bin:/usr/ucb:/etc:/export/home/zchen/home export PATH Thanks, Z (4 Replies)
Discussion started by: randomcz
4 Replies

8. UNIX for Dummies Questions & Answers

Setting path for GCC?

Dear all, I have downloaded the latest version of gcc --- gcc-3.3.1.tar.gz from gnu.org. My Linux distribution is Mandrake 9.0. This was how I installed it: su - passwrd: mkdir /usr/local/src cd /usr/local/src gunzip /tmp/gcc-3.3.1.tar.gz #where I downloaded the file tar xvf... (2 Replies)
Discussion started by: HOUSCOUS
2 Replies

9. UNIX for Dummies Questions & Answers

Global PATH setting

I am using Solaris 8 and I want to change the PATH setting for all users. I have edited /etc/profile, but when I log in and check the PATH variable, it hasn't changed. Am I missing something? (5 Replies)
Discussion started by: jxh
5 Replies

Featured Tech Videos