312-50V13 · Question #432
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 (.). On a Linux system, starting a filename with a period (.) is the standard method to hide the file from casual directory listings.
Question
Options
- AExclamation mark (!)
- BUnderscore (_)
- CTilde H
- DPeriod (.)
How the community answered
(21 responses)- A5% (1)
- D95% (20)
Why each option
On a Linux system, starting a filename with a period (.) is the standard method to hide the file from casual directory listings.
An exclamation mark '!' has no special meaning for hiding files in Linux; it is a valid filename character.
An underscore '_' is a regular character and does not cause a file to be hidden in Linux.
A tilde '~' is commonly used to represent a user's home directory or backup files, but it does not hide a file when placed at the beginning of a filename.
In Linux and Unix-like operating systems, files and directories whose names begin with a period ('.') are treated as hidden files and are not displayed by default in directory listings, such as with the 'ls' command, unless specific options like 'ls -a' are used. This convention is a simple way to conceal configuration files or other non-essential user-visible files.
Concept tested: Linux hidden file convention
Source: https://linux.die.net/man/1/ls
Topics
Community Discussion
No community discussion yet for this question.