GCIH · Question #426
Unix files beginning with which of the following characters are considered hidden?
The correct answer is D. In Unix and Linux systems, files and directories whose names begin with a period are treated as hidden and are not displayed by default in directory listings.
Question
Unix files beginning with which of the following characters are considered hidden?
Options
- A!
- B$
- C?
- D.
How the community answered
(25 responses)- A4% (1)
- B4% (1)
- D92% (23)
Why each option
In Unix and Linux systems, files and directories whose names begin with a period are treated as hidden and are not displayed by default in directory listings.
The exclamation mark has no special hidden-file meaning in Unix; it is used in shell history expansion.
The dollar sign is a shell metacharacter used to reference variable values, not to denote hidden files.
The question mark is a shell glob wildcard matching any single character, not a hidden-file prefix.
The Unix convention treats any file or directory name beginning with a dot (.) as hidden. Tools like 'ls' omit these entries unless the '-a' flag is used, and this behavior is enforced by the shell and filesystem utilities rather than a permission setting.
Concept tested: Unix hidden file naming convention
Source: https://www.gnu.org/software/coreutils/manual/html_node/ls-invocation.html
Topics
Community Discussion
No community discussion yet for this question.