Penguin
Note: You are viewing an old revision of this page. View the current version.

This term is a wonderful demonstration of Unix at large being an organically grown system that was shaped and moulded as its users' habits built upon each other. It is the colloquial name for a file that stores some of a user's settings or preferences for a specific application or a class thereof. The name derives from the fact that they're commonly stored in a file or directory whose name starts with a dot, located directly under the user's home directory. This became a convention because of the larger convention that filenames starting with a dot be treated as hidden, although there's nothing actually special about them. This was originally a simple heuristic to avoid having the special . and .. directories show up in every file listing.

Examples of DotFiles can be seen in SampleConfigFiles.

Unfortunately, dotfiles have led to the chronic phenomenon of dotfile clutter. Do an ls -lA on a typical user’s home directory, and you will likely see dozens of names beginning with dots. This has a few unfortunate effects:

  • Lack of privacy. If the user wants to make some files readable to other users on the machine, those files have to be put in a directory which is readable by those other users. But in order to access that directory, its parent directory also has to be readable by those users. And its parent, as appropriate, and so on right up the user’s home directory—the one containing all these dotfiles. So other users can at least see the names of those dotfiles, if not their contents, and thereby deduce what applications it’s likely you’re using.
  • Untidiness. Anything the user wants to create, has to be found by starting from the top level of their home directory. So at this top level, you have a whole bunch of items mixed together, some created explicitly by the user, others implicitly by apps run by the user. Yes, directory-listing utilities commonly offer the option to hide dotfiles and just show the others, but the opposite option seems a little harder to achieve.