In case you are just testing it out, don’t use -rf
Your ~ directory is most probably empty, so use rm -d instead, to prevent all footguns in case you put the wrong character in the end.
-d, --dirremove empty directories
I feel safe doing rm -d /.
I feel safe doing sudo rm -d /.
Because it won’t delete anything that has a file in it.
rm -rf “~” may work?
No, but single quotes will.
huh, I almost removed my entire home directory
In case you are just testing it out, don’t use
-rf
Your
~
directory is most probably empty, so userm -d
instead, to prevent all footguns in case you put the wrong character in the end.-d, --dir remove empty directories
I feel safe doing
rm -d /
.I feel safe doing
sudo rm -d /
.Because it won’t delete anything that has a file in it.