Export large directory as multiple zipfiles

By.

min read

My profile

Share this:

Get all files first

ls -1tr /path/to/directory/cdr* > filelist.txt

Split on lines (1000 for instance)

split -l 1000 filelist.txt split

Backup (PER split file)

zip backupa.zip -@ < splita

@see https://askubuntu.com/questions/54579/how-to-split-larger-files-into-smaller-parts
https://unix.stackexchange.com/questions/473479/grab-the-oldest-100-files-out-of-thousands-and-zip-them-up-but-also-create-a-lis

Share this:

Leave a Reply

Your email address will not be published. Required fields are marked *