rendered paste bodybash-3.00# less fill_r_up.pl
#!/usr/bin/perl -w
use Cwd;
use File::Copy::Recursive qw(fcopy rcopy dircopy fmove rmove dirmove);
while (1) {
my $new_folder;
do {
# Make new directory
$new_folder = "/Storage/" . `date '+%m%d%H%M'`;
chomp($new_folder);
print "Creating directory [$new_folder]\n";
mkdir $new_folder;
# Copy contents of /usr to new directory
chdir("$new_folder");
print "Now in [";
print getcwd;
print "]\n";
} while(dircopy("/usr", $new_folder));
# if full, then empty ;)
chdir "/Storage";
`rm -rf ./*`;
}
bash-3.00# df -h
Filesystem size used avail capacity Mounted on
/dev/md/dsk/d30 9.2G 4.3G 4.8G 48% /
/devices 0K 0K 0K 0% /devices
ctfs 0K 0K 0K 0% /system/contract
proc 0K 0K 0K 0% /proc
mnttab 0K 0K 0K 0% /etc/mnttab
swap 1.1G 708K 1.1G 1% /etc/svc/volatile
objfs 0K 0K 0K 0% /system/object
/usr/lib/libc/libc_hwcap1.so.1
9.2G 4.3G 4.8G 48% /lib/libc.so.1
fd 0K 0K 0K 0% /dev/fd
swap 1.1G 4K 1.1G 1% /tmp
swap 1.1G 20K 1.1G 1% /var/run
Storage 5.8T 2.6G 5.8T 1% /Storage
bash-3.00#