LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Symbolic link? (https://www.linuxquestions.org/questions/linux-newbie-8/symbolic-link-320634/)

jasone 05-06-2005 02:09 AM

Symbolic link?
 
Hello!

I have in my /usr/bin a file called btdownloadxterm.sh which I would like to be able to start from wherever I'm located (ex. /home/myuser) with the command bt or bitttorrent. How do I do this? Is this what's called a symbolic link?

Thanks!

chii-chan 05-06-2005 02:27 AM

Code:

ln -s /usr/bin/btdownloadxterm.sh /usr/bin/bt
will do.

ln - the linking program.
-s - the option to softlink the first parameter (/usr/bin/btdownloadxterm.sh) to the second parameter (/usr/bin/bt). With this you'll only need to type 'bt' in command line.

Search for "soft linking" in Google for more info (I know 'man ln' is quite confusing).

bnj 05-06-2005 07:06 AM

Normally, /usr/bin should be in your path. So you should be able to launch the programm by just typing (no matter in which directory you currently are) the name of the script.

To check whether /usr/bin is in your path, type

> echo $PATH

if the output contains /usr/bin between two ':' or at the beginning or at the end, it should work fine. If not, add it to you path. The command for that is

> setenv PATH "/usr/bin:"$PATH

(if you are using tc shell). Then, to make sure it will be included in your path whenever you open a new shell, add the same line to a file called .tcshrc in your home directory. If this file does not exist, create it.

bnj 05-06-2005 07:07 AM

By the way, make sure the script is executable:

> chmod 700 /usr/bin/btdownloadxterm.sh

jasone 05-06-2005 07:55 AM

Thank you! I'll check that out. Didn't know anything about path's before. I'm using slackware and my path to xorgconfig doesn't work so I guess there is some more things I'll have to change..


All times are GMT -5. The time now is 08:22 PM.