Site icon LinuxCommands.site

linux find command tutorial: find syntax and examples

linux find – search for files in a directory hierarchy.

syntax

find [-H] [-L] [-P] [-D debugopts] [-Olevel] [starting-point...] [expression]

examples

use find command – find file

➜ find . -name "test*" -type f

find – type filter explanation

➜  blog find . -type d

where x may be any of:

use ls & grep command

➜ ls -R . | grep -E "test*"

Reference:

https://en.wikipedia.org/wiki/Find_(Unix)
https://en.wikipedia.org/wiki/Grep

Exit mobile version