Here is and example of what I'm referring to. The tilde means "/home/usr/", but what does the dot indicate. I know it's not acting as " * " would.



  • 4
    It's not /. + cpan, it's / + .cpan - a directory separator (/) and its name .cpan. The latter's beginning from full stop sign means that it's hidden. – raina77ow Feb 11 '14 at 16:59
  • 1
    In your example, .cpan is a hidden folder. See what are dot-files. – admdrew Feb 11 '14 at 16:59
  • I just did a find and as you said it is an actual directory name. Thanks – user1807271 Feb 11 '14 at 17:00
  • 1
    It is "an actual directory name" only in the sense that it is an alias for its predecessor in the path string (or for the current directory if there is no predecessor). This is an important difference; see my answer. – dvnrrs Feb 11 '14 at 17:27
  1. "/." pronounced "Slashdot" is a popular tech news website.

  2. . in a UNIX filesystem context is similar to a "no-op"; it is the "identity" path and refers to the immediately preceding directory (or the current directory if there is nothing preceding it). So /. is equivalent to / and /home/me/. is equivalent to /home/me. . by itself is equivalent to the current directory. This has uses in some situations: for example, running ./command runs a program called command and requires it to be located in the current directory, bypassing the PATH.

  3. . as a filename prefix means a hidden file, as @LaurentB said in his answer; however . by itself cannot be the name of a file. Filenames beginning with . are not typically shown by ls or other directory listing programs unless an option is set to view hidden files.


It indicates a hidden file/folder.
Try to list it with ls -> you won't see it.
With ls -a you will.

  • This is incorrect. . by itself cannot be used as the name of a file. – dvnrrs Feb 11 '14 at 17:04
  • 1
    @dvnrrs I don't think that's what he meant. – woz Feb 11 '14 at 17:18
  • @woz I don't think hidden files is what the OP meant; in any case this answer is incomplete without making that distinction. – dvnrrs Feb 11 '14 at 17:20
  • 2
    @dvnrrs You're right that you can't use a dot by itself (since that indicates the current folder), but you're wrong about this answer being incorrect. Laurent B merely states that files beginning with a dot are hidden. – Kat Feb 13 '14 at 20:05

"~/.cpan/" is a hidden directory ".cpan" in your home directory. "~" is an unix abbreviation for a user's own home directory. ~user_X points to user_X's home directory.

Your Answer

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