linux search file in all directories code example

Example 1: linux search all directories for file

find / -iname 'book1*'

Example 2: ubuntu terminal find file recursive

sudo find . -print | grep -i '.*[.]xml'

Example 3: search all folders for file match linux

find . -name "foo*"

Example 4: how to search in a directory files in linux

# this will search all subdirectories for text (no case sensitivity)
grep -inR "your text" .
# Node: this command will search for text INSIDE Files, not file names