linux find file by name code example

Example 1: linux find any file linux

#find a file and print with path
find . -print | grep -i *.txt

Example 2: bash find file by name

find . -name 'mystring*'

Example 3: how to find a file in linux terminal

find /path/to/folder/ -iname *file_name_portion*

Example 4: terminal how to find a file name

find / -name NAME.EXTENSION

Example 5: find by name linux

# dot is curr dir 
find . -name "*.txt"

Example 6: search for files in linux terminal

find /path/to/folder/ -iname *file_name_portion*

#Example
find / -iname *test*

#Output

/downloads/test_2.txt
/downloads/test_1.csv
/home/ubuntu/first_test.txt