Linux Command to List all Directories

0
11

this is a very simple requirement, but is still asked by many , thats why i am posting this small post

]# ls -l | grep ^dls -l | grep ^d

what is this : i am piping  the out put of ls -l to grep

ls -l : will list all files with details, while grep ^d filter the out put which starts with d , obeviously the directories 🙂

LEAVE A REPLY

Please enter your comment!
Please enter your name here