Search
The find command
Finds files and folders by name, type or size inside a tree.
Most useful options
-nameSearches by name (accepts wildcards)-typeFilters by f (file) or d (folder)-sizeSearches by sizeCopy-ready examples
$ find . -name *.txtEvery .txt from here$ find . -type dOnly folders$ find /etc -name passwdSearch the whole systemYou can try them in the browser terminal: it does not touch your computer.
Typical mistakes
- The first argument is where to search from; the dot is the current folder.
FAQ
Does find search inside files?
No: it finds files and folders. For the content you use grep.
More Search commands
Learn to actually use it
The basic Linux course takes you from zero to console fluency with 24 self-grading lessons.
Start the free course