The query actually shows a lack of confidence. He should have googled "How to recover a file from /dev/null?" instead.
65 0 Reply36 0 ReplyCan you not just try it with a dummy folder??
1 0 Reply
- Stack Overflow
9 0 ReplyTop voted answer
"Why would you want to?"
8 0 Reply
"... you don't. You recover it from /dev/random. Eventually."
58 1 ReplyAnd if really want quality recovery,
/dev/urandom
. Might take a bit longer, but it's worth the wait 👌.11 0 Reply
Duh, just read it back from
/dev/random
You will recover the data, you just need to wait long enough.
28 1 ReplyPatience is key.
6 0 Reply
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?
21 1 ReplyThat is true, though it would be pointless to look for it in
/dev/null
.17 0 ReplyThere is nothing in /dev/null, and no man needs nothing.
7 0 Reply
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.
17 0 ReplyThat is... brilliant! I love it!
8 0 Reply
Programmatically, what does the kernel actually do with data sent to /dev/null? Put it in a temp buffer and just delete it?
14 0 ReplyI 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; }
19 0 ReplySo it's basically doing nothing and lying about it. 😆
16 0 Reply
The syscall to write passes a buffer and length. If it is Dev null the call just returns without doing anything more.
17 0 ReplyProgrammatically, 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
This is the worst meme template, ever
6 2 ReplyWhy would you be trying to recover something from a virtual device?
1 0 ReplyBecause apparently, he moved it there... and doesn't know what
/dev/null
is...4 0 ReplyIt is still on the disk though
Do people not understand how files work? Actually never mind that makes sense.
2 0 ReplyIt is still on the disk though
Do people not understand how files work? Actually never mind that makes sense.
2 0 Reply