This is part of the Semicolon&Sons Code Diary - consisting of lessons learned on the job. You're in the unix category.
Last Updated: 2024-12-03
There is a risk that rm
can remove parent directories ..
if unused
carelessly.
$ rm *
(this skips hidden dot files. It is totally safe)
rm .*
deletes hidden files in current directory. At least on macos, it doesn't go near ..
Even if it did go near ..
it is usually OK because rm
without any options does not touch directories.
But then there is danger that rm was remapped to rm -rf
and then the ..
directory is at risk.
Therefore interactive mode is your friend: rm -i .*
when you are uncertain.