Quoting Daniel Ouellet <[EMAIL PROTECTED]>:
> Only two things here.
>
> 1. "you have to identify your sparse file in advance."
>
> That is the question. Look at the title.
>
Hi, Daniel.
Did you look at the Perl script I sent?
[code]
use strict;
use warnings;
use File::Find;
sub process_file {
my $f=$File::Find::name;
(my $dev,my $ino,my $mode,my $nlink,my $uid,my $gid,my
$rdev,my $size,my $atime,my $mtime,my $ctime,my $blksize,my $blocks)
=stat($f);
if ($blocks * 512 < $size) {
print "\t$f => SZ: $size BLSZ: $blksize BLKS: $blocks
\n";
print "\t" . -s $f;
print "\n";
}
}
find(\&process_file,("/home/sparse-files"));
[/code]
Change the "/home/sparse-files" to a directory that has sparse files, and see if
it works - it should only list files where size is less than blocks * 512 (and
according to Otto, these are sparse files.)
If this DOES work, it might be a building block or an approach that can be
extended. Or it might be useless - only one way to find out.
(P.S. - and I'm trying to be helpful here so PLEASE take it as that, not me
being mean - "witch" is a person on a broomstick and "waist" is around your
hips - you usually intend "which" and "waste" in your postings.)