If you have the original disk and can mount the filesystem then do this:

create a script like this and call it say /dir/testcatfile:
cat $1 > /dev/null
RC=$?
if [ ${RC} != 0 ] ; then
  echo "$1 is corrupt"
fi

chmod +x /dir/testcatfile

Then do this:
find /tmp -type f  -exec /dir/testcatfile {} \;

each file it gets an io error on will print out a message.

This only works if you still have the original and can mount it as it
relies on the disk returning io errors on the original disk.

On Sat, Sep 22, 2018 at 9:20 AM Tony Nelson
<tonynel...@georgeanelson.com> wrote:
>
> On 18-09-22 00:44:17, Ranjan Maitra wrote:
>   ...
> > Is this the right thing to do?
>
> Probably.  I expect the affected files to contain NULs, which you could
> search for.  Then you'd know that you have the correct files and where
> the damage is.
>
> --
> ____________________________________________________________________
> TonyN.:'                       <mailto:tonynel...@georgeanelson.com>
>        '                              <http://www.georgeanelson.com/>
> _______________________________________________
> users mailing list -- users@lists.fedoraproject.org
> To unsubscribe send an email to users-le...@lists.fedoraproject.org
> Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
> List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
> List Archives: 
> https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org
_______________________________________________
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org

Reply via email to