home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
c't freeware shareware 1997
/
CT_SW_97.ISO
/
pc
/
software
/
entwickl
/
win95
/
pw32i306.exe
/
eg
/
dus
< prev
next >
Wrap
Text File
|
1994-10-18
|
587b
|
23 lines
#!/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;