[Gllug] Recover accidentally truncated file

Jose Luis Martinez jjllmmss at googlemail.com
Tue Aug 19 11:10:40 UTC 2008


My definition of "easily" is clearly very pesimistic :-)

2008/8/18 Alistair Mann <al at lgeezer.net>:
> Simon Perry wrote:
>> When saving an audio stream I accidentally started writing to an
>> existing file rather than a new one. I stopped the write immediately and
>> now I have a very small file.
>>
>> Is there a way that I can recover the rest of the data that was in the
>> original file? My google fu is week this morning - I'm only finding info
>> on restoring deleted files.
>
> One can recover data within Linux fairly easily using dd. The difficulty
> comes in determining which of that data goes where ... easier with text
> files than audio I should think.
>
> Complicated this, but should be massagable into something useful:
>
> 1. Discover what the first dozen bytes of your accidentally written file
> says: head -c 12 myfile | od -x | cut -d ' ' -f2- | tr -d '\n ' >
> /tmp/look_for_this
<snip>
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list