Shell/Bash: how to find a file in linux terminal Example

By

Shell/Bash Example: This is the "how to find a file in linux terminal" Example. compiled from many sources on the internet by SimpleTutorials.org

linux find any file linux

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

how to find a file in linux terminal

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

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

ubuntu search file in specific folder

// Using backslash and asterisk (\*) at the end will search for all files that start with your search term (in this case "readme"). So you would also be able to find "readme2" etc. 
find . -name readme\*


* Summary: This "how to find a file in linux terminal" Shell/Bash Example is compiled from the internet. If you have any questions, please leave a comment. Thank you!

Others