Re: Command Preference

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 07/08/2010 10:15 PM, Alejandro Rodriguez Luna wrote:
> 
> Hi all!!, i have a question related to the preference of a command.
> 
> What if I have 2 command like ls, one in /bin/ls and another in
> ~/bin/ls, i'd like to use my own ls, how i can do that?
> 
> putting PATH=~/bin:/bin. I mean, my path at the beginning?

Setting your PATH environment variable is the preferred way to specify
command execution preferences.  The directories listed there get
"searched" in order looking for the command to run.  IIRC, shell builtin
commands get run before checking the PATH.

Don't forget to "export" your PATH variable during or after setting it
so that sub-shells can use the new value.

And don't forget to look at what your system is currently using for a
PATH as you don't want to break it with your changes....

-- 
Kevin J. Cummings
kjchome@xxxxxxx
cummings@xxxxxxxxxxxxxxxxxx
cummings@xxxxxxxxxxxxxxxxxxxxxxx
Registered Linux User #1232 (http://counter.li.org)
-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux