Sophie

Sophie

distrib > Mageia > 1 > i586 > by-pkgid > de1627a5e16807b2a6b1eb45021d2ef8 > files > 5

e2fsprogs-1.41.14-2.mga1.src.rpm

#!/bin/sh

if [ -z "$1" ]
then
  echo Specify a device.
  exit 1
fi

inode=`dumpe2fs $1 2> /dev/null | grep "Journal inode:" | \
 sed -e 's/^.*\([0-9][0-9]*\).*$/\1/' `

if [ -z "$inode" ]
then
  echo $1 does not have a journal inode.
  exit 1
fi

echo "stat <$inode>" | debugfs $1 2> /dev/null | grep "User:.*Size:" | sed 's/^.*Size:[^0-9]*\([0-9][0-9]*\).*$/\1/'