Successful_Try543 @feddit.org The query actually shows a lack of confidence. He should have googled "How to recover a file from /dev/null?" instead.
67 0 Replybrbposting @sh.itjust.works 37 0 ReplyKairos @lemmy.today Can you not just try it with a dummy folder??
1 0 Reply
wander1236 @sh.itjust.works - Stack Overflow
9 0 Replysundray @lemmus.org Top voted answer
"Why would you want to?"
8 0 Reply
palordrolap @fedia.io "... you don't. You recover it from /dev/random. Eventually."
59 1 Reply0x4E4F @sh.itjust.works OP And if really want quality recovery,
/dev/urandom
. Might take a bit longer, but it's worth the wait 👌.12 0 Reply
qjkxbmwvz @startrek.website Duh, just read it back from
/dev/random
You will recover the data, you just need to wait long enough.
30 1 Reply0x4E4F @sh.itjust.works OP Patience is key.
6 0 Reply
BaroqueInMind @lemmy.one 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?
22 1 Reply0x4E4F @sh.itjust.works OP That is true, though it would be pointless to look for it in
/dev/null
.17 0 Replystoicmaverick @lemmy.world There is nothing in /dev/null, and no man needs nothing.
8 0 Reply
stoicmaverick @lemmy.world 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.
18 0 Reply0x4E4F @sh.itjust.works OP That is... brilliant! I love it!
8 0 Reply
TimeSquirrel @kbin.melroy.org Programmatically, what does the kernel actually do with data sent to /dev/null? Put it in a temp buffer and just delete it?
15 0 Replym_f @midwest.social 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; }
20 0 ReplyTimeSquirrel @kbin.melroy.org So it's basically doing nothing and lying about it. 😆
16 0 Reply
Flipper @feddit.org The syscall to write passes a buffer and length. If it is Dev null the call just returns without doing anything more.
17 0 ReplyBoxscape @lemmy.sdf.org 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.
6 0 Reply
c0smokram3r @midwest.social Permanently Deleted
6 2 ReplyPossibly linux @lemmy.zip Why would you be trying to recover something from a virtual device?
2 0 Reply0x4E4F @sh.itjust.works OP Because apparently, he moved it there... and doesn't know what
/dev/null
is...4 0 ReplyPossibly linux @lemmy.zip It is still on the disk though
Do people not understand how files work? Actually never mind that makes sense.
2 0 ReplyPossibly linux @lemmy.zip It is still on the disk though
Do people not understand how files work? Actually never mind that makes sense.
2 0 Reply