Search

Find command

Search files

find -type f

Search owned by user name or ID

find -user username|id

Search owned by group name or ID

find -group groupname|id

Search with grep

grep <pattern> <file> # grep hello hello.txt

grep flags with examples:

  • -i - case insensitive

  • -r - recursive

  • -v - don't match lines

  • -w - whole word

  • -A - after

  • -B - before

Last updated

Was this helpful?