I'm going through the "Unix Programming Environment" book, and I don't get what the dot means in the follwing path :
/user/you/recipes.pie
Thanks in advance
EDIT: I meant "dot" instead of "colon", my bad.
I'm going through the "Unix Programming Environment" book, and I don't get what the dot means in the follwing path :
/user/you/recipes.pie
Thanks in advance
EDIT: I meant "dot" instead of "colon", my bad.
Your example doesn't even include a colon.
Here's an actual PATH variable from one of my systems: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin:/usr/i686-pc-linux-gnu/gcc-bin/4.9.3
Every entry in this colon delimited variable represent a directory which should be looked at for the executable called if it's not called with it's full path. For example, running ls
would cause the shell to check for /usr/local/sbin/ls
, /usr/local/bin/ls
/, /usr/sbin/ls
, /usr/bin/ls
, /sbin/ls
, to finally find /bin/ls
and run it.
Note that most shells will hash
the found result to avoid searching through the path next time.
The dot (.
) inside a filename has absolutely no impact on its operation in the Unix (or Linux) environment, but is commonly used, like in Windows, to represent a file's extension which can help tell what the file type is.
Note that a dot at the beginning of a filename, such as /myfolder/.filename
hides the file from a regular listing.
cat /etc/passwd
and to understand what a colon-separated file is. But what you're providing, is a path, and is not colon separated! Since there is no colon:
. – Aug 12 '16 at 20:16