Leaked source code of windows server 2003
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

  1. #!/usr/bin/perl
  2. # $RCSfile: dus,v $$Revision: 4.1 $$Date: 92/08/07 17:20:11 $
  3. # This script does a du -s on any directories in the current directory that
  4. # are not mount points for another filesystem.
  5. ($mydev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,
  6. $blksize,$blocks) = stat('.');
  7. open(ls,'ls -F1|');
  8. while (<ls>) {
  9. chop;
  10. next unless s|/$||;
  11. ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,
  12. $blksize,$blocks) = stat($_);
  13. next unless $dev == $mydev;
  14. push(@ary,$_);
  15. }
  16. exec 'du', '-s', @ary;