List the Directory Name
March11
We can use the below commands to display only the directory names
$ echo */
Scripts/ unix-commands-cheat-sheet_files/
$ printf “%s\n” */
Scripts/
unix-commands-cheat-sheet_files/
$ ls -d */
Scripts/ unix-commands-cheat-sheet_files/
$ ls -l | grep ^d
drwxr-xr-x 2 kamaraj kamaraj 4096 2011-03-11 21:25 Scripts
drwxr-xr-x 4 kamaraj kamaraj 4096 2011-02-09 01:11 unix-commands-cheat-sheet_file
$ find . -maxdepth 1 -type d
.
./unix-commands-cheat-sheet_files
./Scripts
Recent Comments