Answers for "linux delete directory recursively"

1

remove folder recursively by name linux

find . -type d -name folder-name -prune -exec rm -rf {} ;
Posted by: Guest on November-03-2021
6

remove directory and contents linux

rm -r path
Posted by: Guest on June-27-2020
0

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 {} ;
Posted by: Guest on August-10-2020

Code answers related to "linux delete directory recursively"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language