Linuxで破損したファイルを見つけるより速い方法

Linuxで破損したファイルを見つけるより速い方法

私のハードドライブに破損したファイルを一覧表示する簡単な方法が必要です。

これまで、データファイルシステムのルートでこのコマンドを実行する前に、6.7GiBフォルダで次のコマンドを試しました。

$ time $(which grep) -a -r . ./ 2>&1 >/dev/null | grep -w error 
grep: ./bug_de_l_an_2000.mp4: Input/output error

real    1m40.097s
user    0m18.804s
sys 0m8.052s
$ time $(which find) . -type f -exec cat {} 2>&1 >/dev/null \; | grep -w error
cat: ./bug_de_l_an_2000.mp4: Input/output error

real    1m39.405s
user    0m0.268s
sys 0m7.396s
$ time $(which find) . -type f -exec dd if={} of=/dev/null 2>&1 \; | grep -w error
dd: error reading ‘./bug_de_l_an_2000.mp4’: Input/output error

real    1m12.183s
user    0m6.856s
sys 0m20.092s
$ time $(which find) . -type f -exec pv {} 2>&1 >/dev/null \; | grep -w error
pv: ‘./bug_de_l_an_2000.mp4’: Input/output error

real    1m39.572s
user    0m0.392s
sys 0m11.708s

より速い方法を知っていますか?

ベストアンサー1

おすすめ記事