I have a directory containing several large files that are each greater than 4gb. I want to copy all of those files to a different directory (happens to be a fat32 usb drive mounted), but split the files down to 4gb (since the destination drive is limited to that size files).
I tried this:
split -b 4096G /var/lib/backuppc/images/* /usbdrive/
but I get a
split: extra operand `/var/lib/backuppc/images/xxxxxxxxxmyfilesname.tib'
Am I doing something wrong? (also tried "4G" instead of 4096G, no difference)
My suggestion would be to first create a tar file:
then split that:
If you want to avoid use of the temporary tar file you can pipe tar directly to split:
To reconstruct this when you get to the destination, recreate and unarchive the tar file:
Again, to do this without the temporary file:
split
can't take more than one input file as an argument.You can try using
find
for this