Hidden file and hidden directory
In computing, a hidden directory or hidden file is a directory (folder) or file which file system utilities do not display by default. They are commonly used for storing user preferences or preserving the state of a utility and are frequently created implicitly by using various utilities. Usually the intent is to not "clutter" the display of the contents of a directory with files the user did not create.[1][2][3]
Contents |
[edit] Unix and Unix-like environments
In Unix-like operating systems a file or directory that starts with a period/full stop character (for example: /home/user/.config) is to be treated as hidden, that is the ls command does not display them. Use ls with the flag -a (ls -a) to include them. Midnight Commander shows them by default. The Nautilus file manager also excludes from the display filenames contained in .hidden in each directory (the keyboard shortcut Ctrl-h enables the display of hidden files).
Wildcards on the shell command line will not match dotfiles unless they start with an explicit '.' .
[edit] Mac OS X
In addition to the "dotfile" behaviour, files with the "Invisible" attribute are hidden in Finder . This is set using the SetFile command. For example, invoking SetFile -a V jimbo will hide the file "jimbo". An alternate is to use chflags command. chflags nohidden ~/Library/ clears hidden attribute on user's Library folder in Mac OS X 10.7 while SetFile fails with an error.
[edit] DOS and MS Windows
In MS-DOS and other DOS systems, file directory entries include a Hidden File attribute which is manipulated using attrib command. Use the command line command dir /ah to display the files with the attribute of hidden.
[edit] Abuse
Malicious programs can use this functionality to hide their presence.
[edit] References
- ^ ""Configuring X: What are all those dotfiles for anyway?"". Ha.redhat.com. 2002-11-02. http://ha.redhat.com/mirrors/LDP/linuxfocus/English/March1998/article24.html. Retrieved 2012-02-13.
- ^ "Sample .bashrc and .bash_profile Files", Linux Documentation Project
- ^ "Understanding Linux configuration files". Ibm.com. http://www.ibm.com/developerworks/linux/library/l-config/index.html. Retrieved 2012-02-13.
[edit] External links
- Bellevue Linux Users Group: Hidden files in Unix-like operating systems (via archive.org)
- Computer Hope: Microsoft DOS attrib command