Answers for "search a file in directory linux"

8

bash search file in directory

grep -rnw '/path/to/somewhere/' -e 'pattern'
Posted by: Guest on January-23-2020
0

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
Posted by: Guest on June-23-2020
-2

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
Posted by: Guest on March-25-2021

Code answers related to "search a file in directory linux"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language