I'm going through the "Unix Programming Environment" book, and I don't get what the dot means in the follwing path :


Thanks in advance

EDIT: I meant "dot" instead of "colon", my bad.

  • What is inside the file? Colon separated, you can use 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 :. – FarazX Aug 12 '16 at 20:16
  • 1
    Where is the colon? – Marco Aug 12 '16 at 20:17
  • 1
    that's a dot. you must be seeing it doubly for some reason. – PSkocik Aug 12 '16 at 20:19

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.

Update based on your edit

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.

  • 1
    The dot in a filename does have an impact on Linux. There's no impact at a very low level, but many applications do care about it. – Gilles Aug 13 '16 at 0:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.