Spyke
lemmy.world

The heart skip when an rm command runs longer than expected.

116
Hubireply
feddit.org

When you run a dd command and the light on the USB stick does not start flashing

108
quokk.au

ctrl-c ctrl-c ctrl-c ctrl-c ctrl-c

71
lemmy.world

i ctrl+c my fucking face off when that happens.

oh and in case y'all can't read it, the command is cat * in /bin

50
sh.itjust.works

How do I stop some big mean missed command from tearing up my main drive?

The answer: Use Ctrl-C. And if that don't work, use more Ctrl-C.

And if that don't work? Use Ctrl-Z.

18
lemmy.blahaj.zone

"The right command in the wrong directory can make all the difference in the world. So rise and shine, Mr. Tux. Wake up, and check the log files..."

41
Ænimareply
lemmy.zip

I heard this in G-man's voice from the first two or three words!

5

That was intentional :)

Apart from the initial "Rise and Shine" before the first sentence, this is a direct play on G-man's intro speech from HL2.

3
sopuli.xyz

I've been meaning to tinker with Brfs. Is the idea that snapshots live on a separate volume so you can always recover a messed up system?

9

There are tools like snapper and btrbk that periodically make snapshots. Since btrfs is a COW filesystem, the live subvolume just stores newer changes on top of the snapshot — it doesn't need to copy anything until it changes. Only when file data is no-longer referenced is it actually marked free to overwrite. This can make disk usage a bit un-intuitive since you can have large files stuck in snapshots that don't show up in your live subvolumes but still use up space. It can really save you from serious mess ups and is really cheap in terms of performance. It's also possible to send snapshots over a network to another machine if you want longer term backups without keeping them on local disks.

14

That would be a separate step (send/receive).

But rm -r when you created a snapshot before basically just adds metadata about which files are supposed to be deleted in the current version. The snapshot still has the old filesystem content.

That also means that when you use up all your space, deleting files actually worsens the problem.

7

wondering why firefox hangs as you paste a 30MB text file into an online diff tool

4

Last week “I was trying to fix something” and made some bad decisions. Long story short, wrong command in the right directory the screen flashed like in this meme💀. Well, I liveUSB to reinstall the whole thing. Then I remembered that I installed Cachy with BTRFS snapshots. Bam Fucking magic, it's like nothing happened… I call it the Ohh shit, Ctrl-Z OS troubleshooter. Yep I'm new in linux...

15

rm -rf is always right. No matter where. Supposed, of course, you are root.

No discussion. I am root! I am always right!

10
lemmy.world

Made that mistake last week. Luckily it was just a chmod and not a rm. Stomach did a flip regardless.

9
frostlyttreply
lemmy.blahaj.zone

oh i made that same mistake a month ago when trying to chmod 777 -R another partition... and ran it in / instead

6
lemmy.ml

Luckily it was just a chmod

that can still render a system unbootable 😅

3
lemmy.world

I was trying to sudo rm -rf ./ Once and missed the / so I just used rm -rf . And this was before they added --no-preserve-root as a default so it just ripped through my entire drive.

8
beegnyoshireply
lemmy.zip

sudo rm -rf ./ and sudo rm -rf . are, as far as I know, the same command. Did you mean that you dropped the . and ran sudo rm -rf /?

Fortunately for me, this never happened to me, but I have gotten pretty close to running rm -rf ~ after mistakenly creating a directory caller ~...

6
x00zreply
lemmy.world

after mistakenly creating a directory caller ~…

How do you even delete such a directory?

2

I recently noticed that the logging framework I use does not limit the log's length. I don't know how exactly I filled the memory so quickly, but I did

2

You reached the end