[clug] list only directories

steve jenkin sjenkin at canb.auug.org.au
Wed Nov 20 00:44:46 MST 2013


Matthew Oliver wrote on 20/11/13 6:24 PM:

> find <base path> -type d

By default, 'find' discovers all leaves in the filesystem tree  - one
it's first use was creating filelists to pipe into 'cpio' (AT&T
competitor to BSD's 'tar'), hence the -depth option.


"find / -type d" will list every directory in your system, -nofollow
will ignore symlink'ed directories, -xdev won't cross onto other mounted
filesystems. This can take some time.

You need other options to limit how far 'find' goes.


-- 



More information about the linux mailing list