[NTLUG:Discuss] Shortcuts
Jim Wildman
jim at rossberry.com
Thu Aug 23 21:40:18 CDT 2001
Couple of things here.
The PATH variable is set up when you login. It lists all the places
the shell (bash) will look for a program. There are both system wide
PATH settings (in /etc/profile and others) and user specific PATH
settings (in ~/.profile or ~/.bash_profile). root typically has a
slightly different path than normal users, since many system level
programs are in /sbin or /usr/sbin and you have to be root to run them
anyway.
The reason why ./ (or just .) is not in the default path is because it
can open a security hole thusly... Someone with access to your account
could add a file called 'ls' in a directory that you change to, and
then if "./" is the first element of your path, this new "ls" would be
executed instead of /bin/ls. Which is not a good thing.
A symbolic link is a pointer to a file that already exists. This
saves having multiple copies of the same file in different places.
Links are created using the ln command.
------------------------------------------------------------------------
Jim Wildman jim at rossberry.com
On 23 Aug 2001, Patrick Parks wrote:
> On Thu, 2001-08-23 at 19:03, Fred James wrote:
>
> > Just a touch more detail:
> > In any given Linux/Unix directory there are two special files, . and ..
> > (dot, and dot dot).
> >
>
> Ok, That makes sense to me, so how would I make a file execute in any dir I am in, like when I am logged in as root, and I can type
> linuxconf from any directory that I am in and it executes? Is this called a symbolic link? Sorry to flood the list with newby questions, but I am a newby :)
>
> ,,,,
> (O O)
> +oOO-------(_)-----------+
> | Patrick Parks |
> | www.patrickparks.com |
> |patrick at patrickparks.com|
> +---------------------oOO+
> | | |
> |__| |__|
> || ||
> ooO Ooo
>
More information about the Discuss
mailing list