linux find

Find files recursively in linux

Linux is a very complex operating system and provides a lot of usefull tools and commands. Just a few simple linux console commands to find files in Linux OS (regular search or recursive search):

Find files recursively

#print all files in a directory, recursively
find ./ -type f -follow -print

Search for a string and delete all files containg that string, recursively:
grep -lrIZ "searched string" . | xargs -0 rm -f --

Find files recursively, by extension

#print all files, recursively, by extension
find . -type f -name "*.jpg"

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top