Find files or folders in path
11 March 2022 (Updated 11 March 2022)
find <path> -name <filename>
The find
command helps us find files or folders in a given path. For example, I often want to free up space by deleting unused node_modules
directories. I can do this with a command like:
find $HOME/sites -type d -name 'node_modules'
You can also use wildcards in the name
option:
find $HOME/sites -name '*.png'
Tagged:
Unix
Thanks for your comment 🙏. Once it's approved, it will appear here.
Leave a comment