I thought the flags I mentioned in the question are the same, but I get the following message with the former, but nothing with the latter:
$ find . -mindepth 1 -type d -exec rm -rf {} \;
find: `./practice4': No such file or directory
find: `./practice10': No such file or directory
find: `./practice7': No such file or directory
find: `./practice9': No such file or directory
find: `./practice1': No such file or directory
find: `./practice5': No such file or directory
find: `./practice3': No such file or directory
find: `./practice6': No such file or directory
find: `./practice2': No such file or directory
find: `./practice8': No such file or directory
Extra questions I have are:, is there an simpler code to delete all subdirectories? Is the order of deletion random? I created the directories using
$ mkdir practice{1..10}
for dir in practice{1..10}; do rm -rf $dir; done
. – htor Feb 20 at 22:23rm -rf practice{1..10}
– laebshade Feb 21 at 2:16