listing the directory only

I am happy because I knew Linux I uncovered all the possible command in the terminal mode. Small program but it can be deadly.
I am not going to discuss about how deadly it is but just want to share how to list directory in terminal mode.

To list a file we simply using :
#ls -l
#ls -la
#ls -lha

Everything will be displayed on the screen. But if we want to display the directory instead of files, this is how
#ls -ld */
#tree -dL 1

The command tree without any option will display all the directory structure available in the current position to below.

Happy linuxing.

 

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.