One thing that always bugged me:
touch a rm a
ok, it works as expected
mkdir a rm a
will require -r to work; but I don't understand what is recursive in this? if the folder is empty, there is nothing recursive about it. I would expect rm a to try to remove a, and fail if it's not empty and rm -r to recursively the contents of a.
why is is this like that?
Edit: this question has been flagged as a duplicate of a totally irrelevant question. My question can be summed as: Why do I need a recursive flag to perform a non recursive operation: mkdir a, rm -r a has nothing recursive about it. And this is not related to the other question which is about why rm is not recursive by default.