0% found this document useful (0 votes)
167 views1 page

Linux Command To List Only Directories and Subdirectories

This document provides 3 Linux commands: 1) find directories and subdirectories using find -type d -exec ls -ld {}; 2) find hidden files using find -type f -name ".*" -exec ls -l {} \; or find -maxdepth 1 -name ".[!.]*"; 3) list subdirectories in current directory using ls -ld */ or ls -l | grep "^d".

Uploaded by

akhilr66
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
167 views1 page

Linux Command To List Only Directories and Subdirectories

This document provides 3 Linux commands: 1) find directories and subdirectories using find -type d -exec ls -ld {}; 2) find hidden files using find -type f -name ".*" -exec ls -l {} \; or find -maxdepth 1 -name ".[!.]*"; 3) list subdirectories in current directory using ls -ld */ or ls -l | grep "^d".

Uploaded by

akhilr66
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

1.

Linux command to list only directories and subdirectories


find type d exec ls ld {} \;

2.

To list only hidden files


find type f name .* exec ls l {} \;
or
find maxdepth 1 name .[!.]*

3. To list subdirectories in current directory

ls ld */
or
ls l | grep ^d

You might also like