HOME

TheInfoList



OR:

In
computing Computing is any goal-oriented activity requiring, benefiting from, or creating computer, computing machinery. It includes the study and experimentation of algorithmic processes, and the development of both computer hardware, hardware and softw ...
, a hidden file or hidden directory is a file system object (such as a file or directory) that is excluded from a directory content report unless explicitly requested. The value of hiding files is generally to avoid showing the user files that are not likely to be of interest to them. The feature is not a
security Security is protection from, or resilience against, potential harm (or other unwanted coercion). Beneficiaries (technically referents) of security may be persons and social groups, objects and institutions, ecosystems, or any other entity or ...
mechanism because access is not restricted; the user can request that normally-hidden files be displayed. Hiding is a feature of the programs that display file system objects; not inherently with either the operating or file systems.


Unix and Unix-like environments

The
Unix Unix (, ; trademarked as UNIX) is a family of multitasking, multi-user computer operating systems that derive from the original AT&T Unix, whose development started in 1969 at the Bell Labs research center by Ken Thompson, Dennis Ritchie, a ...
-based ls
shell Shell may refer to: Architecture and design * Shell (structure), a thin structure ** Concrete shell, a thin shell of concrete, usually with no interior columns or exterior buttresses Science Biology * Seashell, a hard outer layer of a marine ani ...
command Command may refer to: Computing * Command (computing), a statement in a computer language * command (Unix), a Unix command * COMMAND.COM, the default operating system shell and command-line interpreter for DOS * Command key, a modifier key on A ...
hides any file that starts with a dot (commonly called a dot file or dotfile) unless the option or is specified. Even with wildcard matching, the command does not match a dotfile unless the expression starts with . For example, does not match , but does. According to
Rob Pike Robert Pike (born 1956) is a Canadian programmer and author. He is best known for his work on the Go programming language while working at Google and the Plan 9 operating system while working at Bell Labs, where he was a member of the Unix t ...
, dotfiles were an unintended consequence of the implementation of the
hierarchical file system In computing, a hierarchical file system is a file system that uses directories to organize files into a tree structure. In a hierarchical file system, ''directories'' contain information about both files and other directories, called ''sub ...
during the Unix 2nd Edition re-write, which introduced . as a name in a directory that refers to the directory itself and .. as a name in a directory that refers to its
parent directory In computing, a directory is a file system cataloging structure that contains references to other computer files, and possibly other directories. On many computers, directories are known as folders or drawers, analogous to a workbench or the t ...
. In order to exclude those two entries from ls output, all entries prefixed with . were omitted. This meant that any file or directory could be excluded from the output of ls by giving it a file name with . as the first character. Commonly, user-specific application configuration information is stored in the user's home directory as a dotfile. Notable dotfiles include startup
shell script A shell script is a computer program designed to be run by a Unix shell, a command-line interpreter. The various dialects of shell scripts are considered to be command languages. Typical operations performed by shell scripts include file manipu ...
s such as .profile, .login, and .cshrc as well as .plan and .project which are used by the
finger A finger is a prominent digit (anatomy), digit on the forelimbs of most tetrapod vertebrate animals, especially those with prehensile extremities (i.e. hands) such as humans and other primates. Most tetrapods have five digits (dactyly, pentadact ...
and name commands. Many applications, from bash to desktop environments such as
GNOME A gnome () is a mythological creature and diminutive spirit in Renaissance magic and alchemy, introduced by Paracelsus in the 16th century and widely adopted by authors, including those of modern fantasy literature. They are typically depict ...
, store user-specific configuration this way, but the '' XDG Base Directory Specification'' aims to migrate such config files to be non-hidden (not starting with ) but stored in a hidden directory $HOME/.config.


Android

The Android operating system provides empty .nomedia files as a hint to apps to exclude the content of the folder. This convention prevents photo and
music Music is the arrangement of sound to create some combination of Musical form, form, harmony, melody, rhythm, or otherwise Musical expression, expressive content. Music is generally agreed to be a cultural universal that is present in all hum ...
files from appearing in picture galleries or played in
MP3 player A portable media player (PMP) or digital audio player (DAP) is a portable consumer electronics device capable of storing and playing digital media such as audio, images, and video files. Normally they refer to small, battery-powered devices ...
apps. This is useful to prevent downloaded voicemail files from playing between the songs in a
playlist A playlist is a list of video or audio files that can be played back on a media player, either sequentially or in a shuffled order. In its most general form, an audio playlist is simply a list of songs that can be played once or in a loop. ...
and to keep personal photos private while still allowing those in other folders to be shared freely. This convention is not enforced by the file or operating systems. Each app is responsible for following the convention.


GNOME

In the
GNOME A gnome () is a mythological creature and diminutive spirit in Renaissance magic and alchemy, introduced by Paracelsus in the 16th century and widely adopted by authors, including those of modern fantasy literature. They are typically depict ...
desktop environment In computing, a desktop environment (DE) is an implementation of the desktop metaphor made of a bundle of programs running on top of a computer operating system that share a common graphical user interface (GUI), sometimes described as a graphi ...
(as well as programs using
GLib GLib is a bundle of three (formerly five) low-level system libraries written in C and developed mainly by GNOME. GLib's code was separated from GTK, so it can be used by software other than GNOME and has been developed in parallel ever since ...
), filenames listed in a file named .hidden are excluded from the directory containing the file. In the file manager, keyboard shortcut + includes both dotfiles and files listed in .hidden.


macOS

In addition to the dotfile behaviour, files with the invisible attribute are excluded by Finder although not by ls. The invisible attribute can be set or cleared via the SetFile command. For example, command line SetFile -a V jimbo hides the file . Starting in
Snow Leopard The snow leopard (''Panthera uncia'') is a species of large cat in the genus ''Panthera'' of the family Felidae. The species is native to the mountain ranges of Central and South Asia. It is listed as Vulnerable on the IUCN Red List because ...
, the chflags command can also be used. For example, chflags hidden jimbo is equivalent.


Windows and DOS

DOS-based file systems, including
Windows Windows is a Product lining, product line of Proprietary software, proprietary graphical user interface, graphical operating systems developed and marketed by Microsoft. It is grouped into families and subfamilies that cater to particular sec ...
, maintain a hidden and a system attribute for each item. The attrib command allows for setting and clearing the attributes.


Dir command

By default, the dir command excludes items that have either the hidden or system attribute. Option /ah includes hidden items and /as includes system items.


Get-ChildItem cmdlet

PowerShell PowerShell is a shell program developed by Microsoft for task automation and configuration management. As is typical for a shell, it provides a command-line interpreter for interactive use and a script interpreter for automation via a langu ...
provides similar capability via the cmdlet which is aliased as . The options are and since PowerShell does not use slash for options.


Explorer

Windows Explorer controls visibility based on system settings that are accessible via the control panel. Explorer excludes items with the hidden attribute unless the settings allow showing items with the hidden attribute (''Show hidden files, folders, or drives'' is checked). For an item marked with the system attribute, but not the hidden attribute, Explorer includes the item. But, if it also has the hidden attribute, then it is only included if settings allow both showing hidden items and ''not'' hiding system files (''Hide protected operating system files'' is unchecked). Even when excluded from view, an item can be accessed by entering its path in the address bar. When included, items with the hidden attribute are displayed with transparency to visually indicate the attribute. The content of a directory can also be hidden by appending a pre-defined CLSID to the end of the folder name. The directory is still visible, but its content becomes one of the Windows Special Folders. However, the actual content can be reteived via the dir command.


References


External links

* Bellevue Linux Users Group: * Computer Hope
Microsoft DOS command

.NOMEDIA file
{{DEFAULTSORT:Hidden file and hidden directory Computer file systems Metadata