top of page
Search

Find files or directories only in Linux?

Kalpana

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

Recent Posts

See All

Commentaires


Post: Blog2_Post
gkTechnical Blog

Subscribe to Stay Up to Date with the Latest Tech News

Get the latest content straight to your inbox. Enter your email below.

Subscribe Form

©2020 by gkTech.

bottom of page