#!/usr/bin/perl -l use strict; use warnings; use File::Find; use constant QUOTA => 4.7 * 2**30; sub wanted (); @ARGV = grep { -d or !warn "Not a directory: `$_'\n" } @ARGV; die "Usage: $0 []\n" unless @ARGV; my ($size,$cnt)=0; find { no_chdir => 1, wanted => \&wanted }, @ARGV; sub wanted () { return unless -f; print 'List ', $cnt++, ':' unless $size; my $sz = -s _; warn "Too big single item: `$_'\n" and return if $sz >= QUOTA; my $newsz=$size + $sz; if ($newsz