LFCA · Question #70
Which option will cause ls to display hidden files and folders?
The correct answer is C. ls -a. The ls -a (or --all) flag tells ls to not ignore entries whose names begin with a dot (.). Files and directories prefixed with a dot are hidden by default in Unix/Linux. ls -l displays a long-format listing with permissions and metadata but still omits hidden files. ls -t sorts…
Question
Which option will cause ls to display hidden files and folders?
Options
- Als -v
- Bls -l
- Cls -a
- Dls -t
How the community answered
(52 responses)- A6% (3)
- B4% (2)
- C88% (46)
- D2% (1)
Explanation
The ls -a (or --all) flag tells ls to not ignore entries whose names begin with a dot (.). Files and directories prefixed with a dot are hidden by default in Unix/Linux. ls -l displays a long-format listing with permissions and metadata but still omits hidden files. ls -t sorts output by modification time. ls -v sorts by version number within filenames. None of -l, -t, or -v reveal hidden entries.
Topics
Community Discussion
No community discussion yet for this question.