On Fri, February 18, 2005 5:58 pm, Christopher Sawtell said: > On Fri, 18 Feb 2005 17:28, Steve Holdoway wrote: >> Anyway, bash uses .bash_profile for this purpose. If you add >> the line >> >> PATH=:$PATH >> >> to this file, or, if there is a line that extends $PATH in any way, then >> add a : immediately after the =, then this modifies it so that it looks >> in >> your current directory first. > Isn't that considered a rather dangerous no no? > Much safer imho to put the current directory at the end of the PATH. vis:- > > export PATH=$PATH:. > A matter of opinion. If it's at the end, then your local 'ls' will only be run if the cwd explicitly used, ie ./ls If that's the case, then it may be considered that there is little or no point using the cwd either first or last, hence the default.
Steve BTW the extra export is unnecessary, PATH is exported in /etc/profile. > -- > C. S. > -- Artificial Intelligence is no match for natural stupidity.
