Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

linux command to delete direcoty with specified name recursivel

# First find the directory names as to not accidentally delete important directories
find . -type d -name __pycache__
# If you want to recursively delete its contents, replace -exec rmdir {} ; by -delete or -prune -exec rm -rf {} ;. Other answers include details about these versions, credit them too.
find . -type d -name __pycache__ -prune -exec rm -rf {} ;
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #linux #command #delete #direcoty #recursivel
ADD COMMENT
Topic
Name
9+9 =