#!/bin/bash
#
# usage: do_debugfs.sh <device> <relative path>
#
# e.g.: do_debugfs.sh /dev/hda2 tmp/blah.file

if [ "$#" != "2" ]; then
	echo 'usage: do_debugfs.sh <device> <relative path>'
	exit 1
fi

DEBUGFS=/sbin/debugfs
DEV=$1
PATH=$2

$DEBUGFS $DEV <<EOF
stat $PATH
quit
EOF
echo

