upvote
i have no recollection of what i lost that day, but i learned a few lessons:

prefix ambiguous paths with ./

rm -r ./~ would have worked.

don't use rm -r when you can avoid it.

rmdir -p ~/something would have failed without causing damage.

rmdir -p ./~/something would have been the best option.

if there are files but no subdirs inside then

    cd dir
    rm ./* (if there is a more specific wildcard that catches all files then use that)
    cd ..
    rmdir dir
is my preference now.
reply