Linux Find and Locate Cheat Sheet/Find directories only

Restrict results to directories.

Section: Find by Name and Type

Find directories only

bash
bash
find . -type d -name 'node_modules'

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Find by Name and Type
Find file by exact name
Search recursively for a specific filename.
OpenIn sheetbashsame section
Case-insensitive name search
Match names regardless of case.
OpenIn sheetbashsame section
Find symbolic links
List symlink entries under a directory.
OpenIn sheetbashsame section
Find files larger than 100 MB
Search for large files using size filters.
OpenIn sheetbash1 tag match
Find world-writable files
Audit overly permissive files.
OpenIn sheetbash1 tag match
Delete old temporary files
Remove matching files directly from find.
OpenIn sheetbash1 tag match