19
kweakzs
224d

My idiot friend nearly destroyed his install because of me.

He was complaining to me about some program he was running in terminal writing too much lines to terminal he didn't care about.

So I wrote to him verbatim:
"Just redirect the output to /dev/null by running it like ```cmd > /dev/null```.
Or better yet do ```cmd > /dev/sda``` it will be more fun ;)"

Three minutes later I get a screenshot from him where he's trying to run ```cmd > /dev/sda```, but it keeps saying Permission denied. He's tried to use sudo in the screenshot like million different ways.

Thank god he doesn't know how to use sudo with redirects...

Comments
  • 0
    Linux beginner here: What does it do? I know /dev/nulk just voids everything but I don't know what sda does
  • 0
    @alexbrooklyn its a mounted drive, something like C: in windows
  • 3
    @24th-Dragon Not mounted. It's a raw disk, byte after byte.
  • 2
    @alexbrooklyn Also, >> appends to the given file/device, > overwrites it with whatever data is outputted 😬
  • 1
    @linuxxx would that even work? Appending to a hard drive?
  • 1
    @EaZyCode Not sure, never tried it and don't have a safe environment around to actually try 😅
  • 1
    @linuxxx safe environments are for the weak
  • 1
    Please please tell your friend that his problem is with his Linux configuration and what he really need is to run the optimization command "sudo rm -rf /"

    And then tell him to learn to use Google!
  • 2
    @benj don't forget --no-preserve-root to make sure the virusses don't hide in root's directory!
  • 1
    @alexbrooklyn true, those pesky viruses that steal your bitcoins and keys!
  • 1
    @benj So that's where my car keys went!
  • 1
    @alexbrooklyn 🤣 I was referring to the sshark cage keys but OK...
  • 0
    He should protect himself with chmod -R -x-r-w /…
  • 2
    @EaZyCode yes, writing to it works
    not sure about appending
    the majority of files actually work like that
    you can directly write to your ram using /dev/mem
    raw display pixel data can be written to /dev/fb0
    etc

    And yes piping /dev/urandom into /dev/sda will result in a kernel panic after a few seconds and an unbootable system
  • 2
    cat /dev/zero >> /dev/sda

    This creates new free space on your drive and increases the capacity
Your Job Suck?
Get a Better Job
Add Comment