LFCA · Question #57
What command do you use to view the structure of system directory hierarchies?
The correct answer is A. tree. The question asks for a command that visually displays directory hierarchies in a tree-like format.
Question
What command do you use to view the structure of system directory hierarchies?
Options
- Atree
- Bfee | ls /etc
- Cls -t
- Dls tree
How the community answered
(57 responses)- A88% (50)
- B2% (1)
- C7% (4)
- D4% (2)
Why each option
The question asks for a command that visually displays directory hierarchies in a tree-like format.
The `tree` command is specifically designed to list the contents of directories and their subdirectories in a recursive, tree-like format. This command provides a clear, visual representation of the entire directory structure.
This is a syntactically incorrect command combination; `fee` is not a standard Linux command.
`ls -t` lists directory contents sorted by modification time, not in a hierarchical tree structure.
`ls tree` would attempt to list a file or directory literally named "tree" (or report an error if it doesn't exist) and does not provide a hierarchical view.
Concept tested: Linux directory navigation (tree command)
Source: https://man7.org/linux/man-pages/man1/tree.1.html
Topics
Community Discussion
No community discussion yet for this question.