WelcomeUser Guide
ToSPrivacyCanary
DonateBugsLicense

©2024 Poal.co

780

(post is archived)

[–] 0 pt (edited )

With rm put the flags at the end.

rm * -rf

Not dangerous until the last key strokes so you have a chance to think about what you are doing.

Let's say I'm deleting a directory addressed from root. Key by key with tab completion.

rm -r /
rm -r /h
rm -r /home/
rm -r /home/x
rm -r /home/x0x7/
rm -r /home/x0x7/.
rm -r /home/x0x7/.s
rm -r /home/x0x7/.ss
rm -r /home/x0x7/.ssh

How many of those could be disasters with one mis-click of enter. 4/9

But put that r at the end at it actually does it's job, acting as a final sign off on deleting a directory, which is the point of it's existence.

[–] 0 pt

The Recursive and Force flags can get you in trouble no matter what command you are using.

[–] 0 pt

Which is why I always put them at the end on all commands. Then all commands are inherently safe(er) unless I add those flags at the end, at which point I re-read the line not trusting what I typed.

One of my favorite things about Unix is that it doesn't ask me question like "Are you sure you want to do this?", "Are you really sure you want to do this?", "Are you really really sure you want to do this?". Like Everything MS produces, but if you've got your head up your ass, you can sure fuck up in a hurry.

[–] 0 pt

But are you sure you are sure you're sure? Click on clippy to indicate your are sure.

All the guys I trained I told them before you run any destructive command. First you run a cd and make sure you're in the directory you want to be in then type the command out then reread it twice before you hit that enter key.