How to split a big tar file in smaller size ?


Here is the well known command to split the larger files into a smaller size.

Command is,

spilit -b 1024M (block size) source_tar_file small_file.tar-PART1


Consider i’m having a 2.6GB tar file and need to split the file as a 1GB.

See below,

[root@Server]# du -sh tallylog.tar
2.6G   tallylog.tar
[root@Server]# split -b 1G tallylog.tar tallylog.tar-part1
[root@Server]# ll | grep -i tallylog.tar
-rw-------. 1 root     root      2672640 May  7 02:30 tallylog.tar
-rw-------. 1 root     root      1048576 May  7 02:32 tallylog.tar-part1aa
-rw-------. 1 root     root      1048576 May  7 02:32 tallylog.tar-part1ab
-rw-------. 1 root     root       575488 May  7 02:32 tallylog.tar-part1ac
[root@Server]# du -sh tallylog*
2.6G    tallylog.tar
1.0G    tallylog.tar-part1aa
1.0G    tallylog.tar-part1ab
594M    tallylog.tar-part1ac



Related posts

Leave a Comment