source: trunk/third/perl/eg/dus @ 10724

Revision 10724, 571 bytes checked in by ghudson, 27 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r10723, which included commits to RCS files with non-trunk default branches.
Line 
1#!/usr/bin/perl
2
3# $RCSfile: dus,v $$Revision: 1.1.1.2 $$Date: 1997-11-13 01:47:39 $
4
5# This script does a du -s on any directories in the current directory that
6# are not mount points for another filesystem.
7
8($mydev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,
9   $blksize,$blocks) = stat('.');
10
11open(ls,'ls -F1|');
12
13while (<ls>) {
14    chop;
15    next unless s|/$||;
16    ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,
17       $blksize,$blocks) = stat($_);
18    next unless $dev == $mydev;
19    push(@ary,$_);
20}
21
22exec 'du', '-s', @ary;
Note: See TracBrowser for help on using the repository browser.