You know the file is on the PC somewhere — you just don’t remember which folder you saved it in. Instead of clicking through folders one by one, let the terminal search for you. One command does it in seconds.
Find a file by its exact name
- Open a terminal.
- Type
find ~ -name "report.txt"and press Enter. Replacereport.txtwith the name you’re looking for. - Linux prints the full path to every match — something like
/home/you/Documents/report.txt.
The ~ tells find to start in your home folder, which is where most of your own files live. To search somewhere else, swap it out — for example, find /home -name "report.txt".
When you only remember part of the name
- Use a wildcard:
find ~ -name "*.pdf"finds every PDF, andfind ~ -name "invoice*"finds anything starting with “invoice”. - Ignore capital letters: use
-inameinstead of-name, soReport.TXTandreport.txtboth count as a match.
Two handy extras
- Hide the permission warnings: searching outside your home folder can fill the screen with “Permission denied” lines. Add
2>/dev/nullto the end of the command to hide them and see only the results. - Start closer to save time: if you know the file is in Documents, start there —
find ~/Documents -name "report.txt"is much faster than searching the whole drive.
Learn just this one command, and “where did I save that?” stops being a folder-by-folder hunt.



