[TriLUG] recovering files from lost+found
Charles Mangin
option8 at option8.com
Wed Dec 2 16:48:23 EST 2009
thanks for the pointer. with a little fiddling and some more googling,
i came up with a workable script:
files=/shmoo/lost+found/*
for f in $files
do file "$f" |
grep "JPEG image data" |
awk -F: '{ printf("mv %s %s\n", $1, $1".jpg") | "sh"}'
done
this is renaming all the random l+f files that are jpegs. with minor
tweaks, i should be able to find all my M4A and M4P files and recover
them.
Charles Mangin
Option8, LLC - Making Macs happy since 1999.
option8 at option8.com | http://www.option8consulting.com
mobile: 919.368.7167
skype: option8llc
On Dec 1, 2009, at 11:41 PM, Peter Neilson wrote:
> Charles Mangin wrote:
>> after recovering from a particularly bad drive problem (since
>> fixed, i think) i was left with a filesystem with a rather large
>> "lost+found" directory.
>> i've discovered that i can use "foremost" to sort those files into
>> filetype by examining their header information. this is great for
>> those filetypes foremost knows about. unfortunately, part of what's
>> in there are a lot of music files in m4a and itunes' m4p format.
>> are there any alternatives to foremost that can handle these
>> filetypes, or can anyone point me to a "foremost.conf" example that
>> i can use to try and teach foremost how to recover these files?
>
> Linux "file" command and its associated /usr/share/file/magic* and /
> etc/magic files, perhaps?
> --
> TriLUG mailing list : http://www.trilug.org/mailman/listinfo/trilug
> TriLUG FAQ : http://www.trilug.org/wiki/Frequently_Asked_Questions
More information about the TriLUG
mailing list