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; ...

Post a Comment

Featured Post

Modern tar recognizes the file format

One command works with any supported compression method. tar xf archive.tar.xz tar xf archive.tar.gz tar xf archive.tar etc. ...