thomasgroch
1/21/2020 - 9:38 PM

Terminal commands for deleting files

Terminal commands for deleting files

find . -name '.DS_Store' -print -delete
# Print out and delete all .DS_Store files in current working directory

find . -type d -name 'node_modules'
# Print a list of all 'node_modules' directories in current working directory

find . -type d -name 'node_modules' -prune -exec rm -rf '{}' +
# Delete all 'node_modules' directories in the current working directory