@lilaj
Linux Oct 13, 2026

Finding a file by name from the Linux command line

I know the file is called something like backup_old but no idea which folder it's in. Is there a command that searches the whole system?
2

Leave A Reply

Log in to post an answer.

2 Answers

sakshi87 Nov 12, 2026
lilaj
If you search a lot, locate is near enough instant because it reads from a database instead of crawling the disk. sudo apt install plocate, then locate notes.txt. Brand new files won't be in it until the database updates, sudo updatedb forces that.
rumpa_gadget Oct 19, 2026
lilaj
find / -iname "notes.txt" 2>/dev/null -iname ignores case, the 2>/dev/null hides all the permission denied noise. Wildcards work too, like "*report*". Searching from / is slow, so start from your home folder if you know it's in there.