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
Leave a Reply