Linux Find Command code example

Example 1: find command in linux

find . -name tecmint.txt

Example 2: find in linux

$ find [where to start searching from]
 [expression determines what to find] [-options] [what to find]
 
 $ find ./GFG -name sample.txt

Example 3: find linux

find . -name "pattern" -print

Example 4: find command in linux

find /home/linuxize -type f -name document.pdfCopy

Example 5: linux find file

# syntax 
# find *</path/to/dir> '(' *<Filter-1> *<and/or-operator> *<filter-2> ')'

# example 
find . '(' -name "Test*.pm" -a ! -name 'Useless*' ')'

Example 6: find command in linux

find /var/log/nginx -type f -name '*.log.gz'Copy