Nov 20, 2017

Fix: find -delete “directory not empty”

Replace -delete with -exec rm -rv {} + or -exec rm -rv {} \; then your script should delete the directory recursively without error (remove the v flag if you do not want verbose output, after testing).

Note: the + at the end will result in rm -rv file1 file2 ... while action of \; will be rm -rv file1; rm -rv file2; ...