Spyke

Syndicated from the fediverse. Read and engage on the original instance.

View original on lemmy.zip

13 replies

lemmy.zip

Don't you have to pass the --no-preserve-root flag for this to work these days?

35
secondreply
feddit.uk

Or use /* for the path so it globs to all directories under / whilst not triggering the logic which requires --no-preserve-root.

19
hayvanreply
piefed.world

Yes, that's how I nuked my workstation once. Part of my development routine was running sudo rm -rf $SDCARD/*. Guess what happens when SDCARD isn't defined.

33
pivot_rootreply
lemmy.world

set -u is your friend. Unless you're running that command interactively, in which case it just exits the shell without giving any warning at all. Oh, the joys of shells written to be compatible with scripts created 20 years ago...

8

It was interactive, but thanks, killing the shell is still better than reinstalling the machine.

6
Sylvartasreply
lemmy.dbzer0.com

Shouldn't it be /*.* for proper nuking or is that unnecessary ? I was told some hidden files would be ignored without it

2

I did this accidentally on my TrueNAS when I was tired and troubleshooting something after midnight… luckily I had a backup

3

You reached the end

sudo rm -rf / | Spyke