That way the pain of having to type AsteRISKdeleteALL instead of * for rm events offsets any anxiety by far.
You can also catch the rm and mv to a difectory with quota's you can call a recycle bin, some low end attached storage can be fine as well as not many situations when your wildcard deleting with a time factor. Can accommodate this in your own skulker to clean up in a more organised way overall in a timely manner. and and scripts you can path to the real rm command if needs be, last time I called it P45Generator, but not the finest for readability in any such scripts.
if a directory has 1.txt, 2.txt, and 3.txt then << rm * >> expands to "rm 1.txt 2.txt 3.txt" and is then executed.
if you have -@, 1.txt, 2.txt, and 3.txt, that expands to << rm -@ 1.txt 2.txt 3.txt >>, and that can't execute.
(if you really wanted to remove your -@ you'd do << rm -- * >> because a double-dash signals the end of command-line options.)
Defending against this being the use of -- to signal an end of command line arguments.
Can someone knowledgeable about the shell expand on this? I don't dare test it on my machine.
$ touch important
$ chmod 400 important
$ rm *
override r-------- vbezhenar/staff for important? n
$ touch -- -rf
$ ls -l
total 0
-rw-r--r-- 1 vbezhenar staff 0 Mar 24 14:35 -rf
-r-------- 1 vbezhenar staff 0 Mar 24 14:35 important
$ rm *
$ ls -l
total 0
-rw-r--r-- 1 vbezhenar staff 0 Mar 24 14:35 -rf
$ rm -- -rfYou can spin up a droplet and use the online shell tool or ssh in (very easy when you've set up a cert as the droplet can have the cert setup automatically).
Then you can mess about with a droplet as much as you like, virtually speaking. Once you're done then use the control panel to destroy the droplet - it costs a few ¢ a day and if you don't have a droplet in use (which means active or paused; preserving images is cheaper but non-zero) then you don't pay anything.
Basically sign up and have a year of uptime to mess with a full install of various OS with no charge.
Make sure you don't write "rm -rf /*" in the wrong terminal!
That sounds like a bug to me, or at least depending on suboptimal behavior.
Example:
$ echo /*
/bin /boot /dev /etc /home (...)
My 'zsh' has this one too, when I 'rm -rf /some/dir/' always asks if I'm "sure". Truth to be told, I'm not even expecting the text in "stdout" anymore, my finger goes to the 'y' automatically, which means that if I make something stupid it won't be able to protect me :-P
The last couple of years I stopped doing 'stupid things' by stop working on the shell when I'm very tired. That was the cause of my rm-related-incidents in the past :-)
touch /--
rm -rf *
(admittedly, this would be a malicious attempt rather than a careless bug)
When accidentally running rm -f *, the command expands to -@ first, which is not a valid option and makes the command fail before doing any harm