in reply to Need directory scheme to store 400,000 images
Three hex characters will distribute 400K files into 100 files per directory. Cache::FileCache uses a similar scheme.use Digest::MD5 qw(md5_hex); my $name = "123456.jpg"; my $path = md5_hex($name); $path =~ s#^(.)(.)(.).*#$1/$2/$3/$name#;
-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: •Re: Need directory scheme to store 400,000 images
by markjugg (Curate) on Apr 12, 2004 at 21:42 UTC |