]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
lsinitrd: display the size of initrd
authorAmerigo Wang <amwang@redhat.com>
Mon, 1 Aug 2011 06:55:15 +0000 (14:55 +0800)
committerHarald Hoyer <harald@redhat.com>
Thu, 11 Aug 2011 12:27:27 +0000 (14:27 +0200)
It is useful to display the size of initrd in human-friendly form.

Signed-off-by: Amerigo Wang <amwang@redhat.com>
lsinitrd

index 3b9cc852d7b70f73bfd79d502d3338d3d748a661..7da9f612004c6b777f46b76f251de7c6261818c5 100755 (executable)
--- a/lsinitrd
+++ b/lsinitrd
@@ -41,7 +41,7 @@ if [[ $# -eq 2 ]]; then
     exit $?
 fi
 
-echo "$image:"
+echo "$image: $(du -h $image | awk '{print $1}')"
 echo "========================================================================"
 $CAT "$image" | cpio --extract --verbose --quiet --to-stdout 'lib/dracut/dracut-*' 2>/dev/null
 echo "========================================================================"