find

Find files and folders by name, type and more

What it does

find walks a folder with all its subfolders and prints the paths that match your conditions. The first argument says where to look (. is the current folder), the conditions follow.

-name matches by name, patterns included: -name "*.log". Quote the pattern, or the shell expands * before find ever sees it. -type f keeps only files, -type d only folders.

Syntax

find <folder> -name "<pattern>"
find <folder> -type d -name <name>

Examples

Related commands

Practise · All commands