#!/usr/bin/perl -w use strict; use Cwd; use File::Find; no warnings 'File::Find'; my ($max,$name,$n) = (0,0,0); sub scanfile { return unless -f; # only files return unless -r; # readable return if -l; # not symlinks $n++; print "." unless ($n % 400); # "progress bar" my $sz = -s; if ($max < $sz) { # save biggest $max = $sz; $name = $File::Find::name; } } print "Scanning..."; $|=1; # flush output find(\&scanfile, cwd); # start in current directory recursively printf("\nBiggest: %d kb %s\n",$max/1024,$name);