You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
587 B
22 lines
587 B
#!/usr/bin/perl
|
|
|
|
# $RCSfile: dus,v $$Revision: 4.1 $$Date: 92/08/07 17:20:11 $
|
|
|
|
# This script does a du -s on any directories in the current directory that
|
|
# are not mount points for another filesystem.
|
|
|
|
($mydev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,
|
|
$blksize,$blocks) = stat('.');
|
|
|
|
open(ls,'ls -F1|');
|
|
|
|
while (<ls>) {
|
|
chop;
|
|
next unless s|/$||;
|
|
($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,
|
|
$blksize,$blocks) = stat($_);
|
|
next unless $dev == $mydev;
|
|
push(@ary,$_);
|
|
}
|
|
|
|
exec 'du', '-s', @ary;
|