Some file systems have the 2GB file size limit, so when we tar something that over 2GB, we need to split it during the archiving. The following is the command:
tar -cvzf – /home | split -b 2000m – /mnt/big.tar
If you want to log the process, use this command:
(tar -cvzf – /home | split -b 2000m – /mnt/big.tar) > log.txt 2> log.txt
So to extract the split archives, use this:
cat big.tar* | tar -tzvf – # to view the archive
cat big.tar* | tar -xzvf – # to extract
cat big.tar* | tar -zx hello.txt -vf – # to extract only one file from the archives
Advertisements
Leave a Reply