What are dot-files?

In Unix/Linux dot-files refers to files/directories with a . prepended to their name. Examples are ~/.bashrc, ~/.bash_profile, etc. The leading dot . is used as an indicator by software like bash and nautilus to not list these files normally but only when they are specifically requested like pressing Ctrl+H in Nautilus. This is because, generally, dot-files are used to store configurations for different applications but they are sometimes used otherwise as well. For example Mozilla creates a .mozilla folder which contains their configuration files as well as browser cache.

People tend to backup & also share their dot-files so others can boot-strap their own applications using those configuration files. An example of a site dedicated to sharing dot-files is http://dotfiles.org.


If you mean when there's a . in front of a file name... The file is hidden. It won't show up unless you make your computer show hidden files and folders.

Try making a new folder, and renaming it to something that starts with a . and then watch it disappear.


Dot files are hidden, as Daniel and Sai said before. If you list files in the directory, they normally don't show up.

In a GUI, mostly file-open/file-save dialogs, you hit the right mouse button, and get a context-menu, allowing you to show hidden files.

Here is, how to handle them in the shell:

example:

$ > touch a b c .d .e f.f g. 

(generated testdata)

$ > wc -l *
0 a
0 b
0 c
0 f.f
0 g.
0 total

As you can see, the first command does not reveal .d and .e

$ > wc -l .*
wc: .: Is a directory
      0 .
wc: ..: Is a directory
      0 ..
      0 .d
      0 .e
      0 total

wc -l .* shows them, and the 2 special files, . which is the PWD, the present working dir, and .. which is the parent of the pwd.

$ > wc -l .* *
wc: .: Is a directory
      0 .
wc: ..: Is a directory
      0 ..
      0 .d
      0 .e
      0 a
      0 b
      0 c
      0 f.f
      0 g.
      0 total

wc -l * .* works on normal and hidden files (which again repeats PWD and the upper directory, but for other commands, * .* might fit better, for example

 find -type f \( -name "*" -or -name ".*" \) -execdir wc -l {} ";"

Which will not show the directories . and ...

If you use firefox for file system browsing, file://home/joe you have an option box to show/hide those files.

Tags:

Files