#!/usr/bin/perl use strict; use warnings; my $file = shift @ARGV; my(@status) = stat $file; print "\n"; if ( $status[7] > ($status[12] * 512) ) { print "$file is sparse\n\n"; } else { print "$file does not appear to be sparse\n"; } system("du -hS --apparent-size $file"); system("du -hS $file"); print "\n";