user path
What's with the period at the end of my path? Do i if i ever change my path type that in manually or is it automatically put there? Thank you
|
The period means that
whatever your current working directory happens to be, said directory *is* in your search path or $PATH pwd is the command that lists whatever directory you are currently in which also is known as your "current working directory". All of this means that if you type and enter the name of an executable file then the system will look for said executable in *all* of the folders in the search path. The sys also searches in order from beginning to end of the folders that are in the search path. I forget where $PATH is set, maybe set in /etc/profile You can add folder onto your $PATH by doing so in your .bashrc file. -- Alan. |
Code:
al@P5Q:~$ $PATH Code:
export PATH=$PATH:/home/al/bin -- Alan. |
Remember, "." and ".." are directory names too. The first one is a hardlink to the current directory, and the second is a hardlink to the parent directory. These are built into the filesystem and are not shell aliases or anything like that.
Your PATH variable simply has the "." directory set in it. If you remove it the only thing that will happen is that you won't be able to automatically run executables from the directory you're sitting in. You'd have to prefix the command with an explicit directory path; e.g. "./execname" |
Quote:
Removing the current directory from the PATH is part of my standard post-install routine. |
Quote:
|
Weird :P
Wow I've never heard of anyone doing that (remvoing it from there path) But I guess it can teach you to not depend up making sure your in the right directory to run commands so i guess it can prove very useful
|
All times are GMT -5. The time now is 12:26 AM. |