I'm fairly new to unix and I have seen a lot of warnings against using rm -rf.
Example: "But, always double check before you use rm -rf command, if you by mistake give this command in your home directory, or any other important directory, it will not ask to confirm, but it will delete everything there."
Can one still run this command followed by a directory name (rm -rf dirName) without deleting other important things if it is run from a home directory?
Generally, what are the safety rules while working with this command? What should one never type and where?
rmand use trash instead. Put an alias in your .bashrc so you don't forget:alias rm='echo rm is disabled, use trash instead'– SurpriseDog Feb 23 '23 at 23:19