312-50V11 · Question #992
To hide the file on a Linux system, you have to start the filename with a specific character. What is the character?
The correct answer is D. Period (.). In Linux, any file or directory whose name begins with a period is treated as hidden and is not shown by default in directory listings.
Question
To hide the file on a Linux system, you have to start the filename with a specific character. What is the character?
Options
- AExclamation mark (!)
- BUnderscore (_)
- CTilde H
- DPeriod (.)
How the community answered
(51 responses)- A2% (1)
- B2% (1)
- C6% (3)
- D90% (46)
Why each option
In Linux, any file or directory whose name begins with a period is treated as hidden and is not shown by default in directory listings.
The exclamation mark has no special hiding semantics in Linux filenames and is treated as a regular character.
The underscore is a valid and visible filename character in Linux with no special hiding behavior.
A tilde prefix typically denotes backup files created by text editors and does not cause the file to be hidden from directory listings.
The period (.) prefix is the Unix/Linux convention for hiding files. When a filename starts with '.', tools like 'ls' omit it from standard output unless the '-a' or '-A' flag is used. This behavior is enforced at the shell and filesystem utility level, not the kernel level.
Concept tested: Linux 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.