Hosed ext3 superblock -- partial success, but about those nameless mysql files...

Bill Bogstad bogstad-e+AXbWqSrlAAvxtiuMwx3w at public.gmane.org
Fri Jun 4 14:29:33 EDT 2010


On Fri, Jun 4, 2010 at 9:14 AM, Charles Bennett <ccb-HInyCGIudOg at public.gmane.org> wrote:

> For future reference: a handy nightly script to run is:
>
>
> for FSROOT in $(cat /proc/mounts | awk '$3 == "ext2" || $3 == "ext3" { print $2 }'); do
>  ( cd $FSROOT
>    FP=$(echo $FSROOT| sed 's/%/%%/p') # mask % in mount point name
>    find . -xdev -printf "$FP\t%p\t%i\n"
>  )
> done

Nice idea.   It would make it less human readable, but you might want
to change that to:

find . -xdev -printf "$FP\t%p\t%i\0"

That will put a 0 (null byte) between each entry.   Useful for the
same reason that -print0 was added to find.

Bill Bogstad






More information about the Discuss mailing list