find

Find all .jpg files in the /home and sub-directories

find /home -name *.jpg

Find an empty file within the current directory

find . -type f -empty

Find all .db files (ignoring text case) modified in the last 7 days by a user named exampleuser

find /home -user exampleuser -mtime -7 -iname ".db"

Find and Process Files

find . -name "*.txt" -exec chmod o+r '{}' \;

Find and Delete Files

find . -name "*.bak" -delete

Find and Process files in folder

find * -name pom.xml -maxdepth 1 -execdir pwd \; -execdir grep "testcontainers" pom.xml \;
linux  shell