Recovering file after cat /dev/null > [foo]
Posted: 2009-03-24 01:44pm
After hearing all the jokes and puns about /dev/null, I got kinda curious, so on a separate partition of my hard drive, I went:
$ echo testing_123456789 > testfile
$ cat testfile
which returned:
testing_123456789
Then I overwrote it:
$ cat /dev/null > testfile
$ cat testfile
"testfile" comes up empty, as I expected after writing null to it, but I've been wondering if it's possible to retrieve the contents of testfile, just for future reference (or in case I run into other such disasters...). What do you think, is it really gone for good, as in, "not even expensive clean-room hard drive rescue service can get this back now, oh noes we's doomed," or can the contents of the file still be retrieved if nothing has been written to that partition?
$ echo testing_123456789 > testfile
$ cat testfile
which returned:
testing_123456789
Then I overwrote it:
$ cat /dev/null > testfile
$ cat testfile
"testfile" comes up empty, as I expected after writing null to it, but I've been wondering if it's possible to retrieve the contents of testfile, just for future reference (or in case I run into other such disasters...). What do you think, is it really gone for good, as in, "not even expensive clean-room hard drive rescue service can get this back now, oh noes we's doomed," or can the contents of the file still be retrieved if nothing has been written to that partition?