in reply to Managing a directory with millions of files
A good tool shouldn't put a strain on low memory environments.use strict; use warnings; my $dir = shift; die "Usage: $0 directory" unless defined $dir; opendir DIR, "$dir" or die "Could not open $dir: $!\n"; my $count = 0; $count++ while defined readdir DIR; closedir DIR; print "$count\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Managing a directory with millions of files
by markhu (Initiate) on Mar 01, 2008 at 19:10 UTC |