Tuesday, January 10, 2012

How to compress folder/file and split into certain sizes

To compress folder/file and then split it automatically with certain sizes, the command is
tar -cvpj 'directory/name'/ | split -d -b 2000m - /name/of/archive.tar.bz2.

To combine them again, just use
cat *.bz2* | (cd path-to-destination; tar jxv)

No comments: