Install directory tree to see directory structure in linux, if not installed previously.
sudo yum install tree
- Run the tree command without any arguments
tree
- View all directories
tree -L 1 /
here, L indicates maximum depth of displaying directory tree
- List the files of the specific directory
tree /home
- To list hidden files of etc directory
tree -a /etc
- To view list in color format
tree -C /etc
- List only the directories using -d parameter
tree -d /home