Home » Questions » Computers [ Ask a new question ]

how to split tar in two files

how to split tar in two files

I'm trying to upload my tar'ed site to server but I have upload limit. My ftp program extracts tar after uploading it. How do I split this one tar into two so I could upload one tar and let it extract itself, and then upload second one and let it extract itself too?

Asked by: Guest | Views: 172
Total answers/comments: 1
Guest [Entry]

"If you have an upload limit, splitting the file into two won't change anything. The two files will combine to almost exactly the same size as the original.

Or did you mean you have a limit on maximum file size uploaded? If so, just tar only some of the files, then tar the rest, e.g. if you are archiving the contents of the directory /home/name/files, and that contains directories one, two, three and four:

tar cvzf first.tgz /home/name/files/one /home/name/files/two

tar cvzf second.tgz /home/name/files/three /home/name/files/four

If you have shell access on the server, you could just use split(1) to cut your single tar archive in half and recombine it on the other side.

Also, are you creating ""tar"" files, or compressed tars, either gzip or (slightly better compression) bzip2? Obviously compressed archives will be smaller."