I feel like the main reason the distinction exists, is because deleting a whole directory can be potentially catastrophic.
I looked at Trashy yesterday, which gives you a command trash my_file that just moves the file into the trashcan folder. Well, and that decided to make no distinction between files and directories, which does make sense to me, since you can just restore a deleted directory.
My solution: rm will remove an empty directory, while a full directory will throw either an “are you sure? y/N” or require you to use rm -r. Why have a command whose only job is to remove an empty directory?
I feel like the main reason the distinction exists, is because deleting a whole directory can be potentially catastrophic.
I looked at Trashy yesterday, which gives you a command
trash my_filethat just moves the file into the trashcan folder. Well, and that decided to make no distinction between files and directories, which does make sense to me, since you can just restore a deleted directory.My solution: rm will remove an empty directory, while a full directory will throw either an “are you sure? y/N” or require you to use rm -r. Why have a command whose only job is to remove an empty directory?