How to find files by name on Linux
Answered
47
I need to search for files by name. What commands can I use?
F
Asked by
fatima_dev
Silver
•
169 rep
1 Answer
24
# Using find
find / -name "filename.txt"
# Case insensitive
find / -iname "*.log"
# Find by type
find /var -type f -name "*.log"
# Using locate (faster but needs updatedb)
sudo updatedb
locate filename.txt
S
Silver
•
222 rep
Your Answer
You need to be logged in to answer questions.
Log In to Answer