GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
BUCKETIZE(1) User Contributed Perl Documentation BUCKETIZE(1)

    bucketize - Move files into buckets

    bucketize files ...

      # Make buckets 100MB in size
    bucketize -s 100m *.jpg

-s
Set the bucket size

"bucketize" takes a number of files and moves them into subdirectories with limited size.

These subdirectories (buckets) are created on-the-fly, and named 001, 002, and so forth.

So, if you have 8 video files like

   10570148 wienerschnitzel 02.avi
   46988832 wienerschnitzel 03.avi
    3609584 wienerschnitzel 04.avi
   76198332 wienerschnitzel 05.avi
   53203604 wienerschnitzel 06.avi
  481153928 wienerschnitzel 07.avi
  442000760 wienerschnitzel 08.avi
  292597256 wienerschnitzel 09.avi

you can ask "bucketize" to put them in buckets not exceeding 1GB each:

    $ bucketize -s 1g *.avi

In this case, "bucketize" will create the following directory structure:

  ./001:
  wienerschnitzel 02.avi  wienerschnitzel 04.avi  wienerschnitzel 06.avi
  wienerschnitzel 03.avi  wienerschnitzel 05.avi  wienerschnitzel 07.avi
  
  ./002:
  wienerschnitzel 08.avi  wienerschnitzel 09.avi

It is an error if a numbered directory already exists, make sure you start with a clean slate.

  $ bucketize *.jpg

  $ bucketize -s 2g *.jpg

Copyright 2007 by Mike Schilli, all rights reserved. This program is free software, you can redistribute it and/or modify it under the same terms as Perl itself.

2007, Mike Schilli <cpan@perlmeister.com>
2012-03-05 perl v5.32.1

Search for    or go to Top of page |  Section 1 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.