top of page
Search

Find files or directories only in Linux?

For files only, use the type f switch.


Files only

find ./ -type f -name "qa*"

Output

./test/qatree.pdf
./test/qa.txt

Directories only


Add the type d option to locate directories only.

find ./ -type d -name "qa*"

Output

./home/qa

259 views0 comments

Comments


Post: Blog2_Post
bottom of page