# ls /dev/sd[a-z][0-9]* | xargs -n1 tune2fs -l | egrep 'Maximum mount count|Check interval' Maximum mount count: -1 Check interval: 0 (<none>) tune2fs: Bad magic number in super-block while trying to open /dev/sda2 Couldn't find valid filesystem superblock. Maximum mount count: -1 Check interval: 0 (<none>) Maximum mount count: -1 Check interval: 0 (<none>) Maximum mount count: -1 Check interval: 0 (<none>) Maximum mount count: -1 Check interval: 0 (<none>) Maximum mount count: -1 Check interval: 0 (<none>) Maximum mount count: -1 Check interval: 0 (<none>) Maximum mount count: -1 Check interval: 0 (<none>)
twitter でつぶやいたら、
yoheia: ls /dev/sd[a-z][1-100]|while read LINE; do tune2fs -l $LINE|perl -nle '/Maximum mount count|Check interval/ and print'; done
posted at 18:34:33
yoheia: もっとスマートにでけないかな
posted at 18:34:47
mat (@cvmat) | Twitter さん、とみたまさひろ💎🐬 (@tmtms) | Twitter さんが教えてくれました。
xargs に -n1 ってオプション指定できるんですね。
ありがとうございました。