this post was submitted on 21 Oct 2024
257 points (99.2% liked)

linuxmemes

21041 readers
661 users here now

Hint: :q!


Sister communities:


Community rules (click to expand)

1. Follow the site-wide rules

2. Be civil
  • Understand the difference between a joke and an insult.
  • Do not harrass or attack members of the community for any reason.
  • Leave remarks of "peasantry" to the PCMR community. If you dislike an OS/service/application, attack the thing you dislike, not the individuals who use it. Some people may not have a choice.
  • Bigotry will not be tolerated.
  • These rules are somewhat loosened when the subject is a public figure. Still, do not attack their person or incite harrassment.
  • 3. Post Linux-related content
  • Including Unix and BSD.
  • Non-Linux content is acceptable as long as it makes a reference to Linux. For example, the poorly made mockery of sudo in Windows.
  • No porn. Even if you watch it on a Linux machine.
  • 4. No recent reposts
  • Everybody uses Arch btw, can't quit Vim, and wants to interject for a moment. You can stop now.

  • Please report posts and comments that break these rules!

    founded 1 year ago
    MODERATORS
     
    top 29 comments
    sorted by: hot top controversial new old
    [–] stoicmaverick@lemmy.world 6 points 5 hours ago (1 children)

    That hack Torvalds keeps denying my pull request to implement /dev/aether which would immediately begin overwriting the entire disk and all other mounted storage with the repeating content of whatever is moved there.

    [–] 0x4E4F@sh.itjust.works 3 points 3 hours ago

    That is... brilliant! I love it!

    [–] palordrolap@fedia.io 34 points 14 hours ago (1 children)

    "... you don't. You recover it from /dev/random. Eventually."

    [–] 0x4E4F@sh.itjust.works 5 points 12 hours ago* (last edited 12 hours ago)

    And if really want quality recovery, /dev/urandom. Might take a bit longer, but it's worth the wait 👌.

    [–] qjkxbmwvz@startrek.website 24 points 14 hours ago (1 children)

    Duh, just read it back from /dev/random

    You will recover the data, you just need to wait long enough.

    [–] 0x4E4F@sh.itjust.works 5 points 12 hours ago

    Patience is key.

    [–] Successful_Try543@feddit.org 51 points 17 hours ago* (last edited 17 hours ago) (2 children)

    The query actually shows a lack of confidence. He should have googled "How to recover a file from /dev/null?" instead.

    [–] wander1236@sh.itjust.works 7 points 13 hours ago* (last edited 13 hours ago) (1 children)
    [–] sundray@lemmus.org 3 points 12 hours ago

    Top voted answer

    "Why would you want to?"

    [–] BaroqueInMind@lemmy.one 19 points 15 hours ago (1 children)

    I mean, if the data was written to a HDD, then any forensic tool can read the magnetic residual patterns on the metal platters instead of looking for file headers?

    [–] 0x4E4F@sh.itjust.works 14 points 14 hours ago (1 children)

    That is true, though it would be pointless to look for it in /dev/null.

    [–] stoicmaverick@lemmy.world 7 points 14 hours ago (1 children)

    There is nothing in /dev/null, and no man needs nothing.

    [–] SmoothLiquidation@lemmy.world 7 points 13 hours ago (1 children)

    A hole would be something, this is NOTHING!

    [–] 0x4E4F@sh.itjust.works 6 points 12 hours ago

    /dev/void 🤔

    [–] TimeSquirrel@kbin.melroy.org 12 points 16 hours ago (3 children)

    Programmatically, what does the kernel actually do with data sent to /dev/null? Put it in a temp buffer and just delete it?

    [–] m_f@midwest.social 16 points 14 hours ago (1 children)

    I was also curious, here's a good answer:

    https://unix.stackexchange.com/questions/670199/how-is-dev-null-implemented

    The implementation is:

    static ssize_t write_null(struct file *file, const char __user *buf,
                  size_t count, loff_t *ppos)
    {
        return count;
    }
    
    [–] TimeSquirrel@kbin.melroy.org 13 points 13 hours ago (1 children)

    So it's basically doing nothing and lying about it. 😆

    [–] taldennz@lemmy.nz 9 points 12 hours ago (1 children)

    "I accepted all of the bytes you gave me. I didn't do anything with them, but I accept you gave them to me".

    [–] 0x4E4F@sh.itjust.works 2 points 7 hours ago

    Could've at least say thank you...

    [–] Flipper@feddit.org 15 points 16 hours ago

    The syscall to write passes a buffer and length. If it is Dev null the call just returns without doing anything more.

    [–] Boxscape@lemmy.sdf.org 5 points 16 hours ago* (last edited 15 hours ago)

    Programmatically, what does the kernel actually do with data sent to /dev/null?

    I imagine it's like getting nullified in that olde show ReBoot.

    [–] c0smokram3r@midwest.social 3 points 11 hours ago

    This is the worst meme template, ever

    [–] possiblylinux127@lemmy.zip 2 points 14 hours ago (1 children)

    Why would you be trying to recover something from a virtual device?

    [–] 0x4E4F@sh.itjust.works 2 points 12 hours ago* (last edited 12 hours ago) (2 children)

    Because apparently, he moved it there... and doesn't know what /dev/null is...

    [–] possiblylinux127@lemmy.zip 2 points 12 hours ago (1 children)

    It is still on the disk though

    Do people not understand how files work? Actually never mind that makes sense.

    [–] shyguyblue@lemmy.world 2 points 11 hours ago

    Do people not understand how files work?

    Oh honey, imagine trying to tech-support a family of rednecks. Threaten to charge them for services and they'll stop pretty quick though...

    [–] possiblylinux127@lemmy.zip 2 points 12 hours ago (1 children)

    It is still on the disk though

    Do people not understand how files work? Actually never mind that makes sense.