LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Create alias or add to $PATH (https://www.linuxquestions.org/questions/linux-newbie-8/create-alias-or-add-to-%24path-219254/)

ryedunn 08-18-2004 09:57 AM

Create alias or add to $PATH
 
I have 1 file in an obscure directory that I regularly run. Typing the absolute path everytime is a pain.

So my question is what is more practicle, adding this directory to my $PATH or creating an alias? ...or is there something else that I should persue?

Ryedunn

mikshaw 08-18-2004 10:06 AM

If it's just a single file, I'd say creating an alias makes more sense. This way the directory is not checked unless you run just that specific command.

ToniT 08-18-2004 10:12 AM

I would recommend neither.

Instead, make a symlink from /usr/local/bin (or /usr/local/sbin, depending on the nature of the program you run) pointing to the binary you run.
Or if the program is such in nature, that it wouldn't be useful to run in any other account than in a certain (regular, eg. not root) users account, then put the symlink to ~/bin of that certain user.

ryedunn 08-18-2004 10:42 AM

perfect
 
Actually I had to read up on symlinks first ... but it was easy enough.. working perfect now.

Thank you!
R


All times are GMT -5. The time now is 09:12 PM.