Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

up vote 5 down vote accepted

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.

share|improve this answer
    
I have a limit on max size uploaded per one file. I'm creating .tar files. –  mea Feb 2 '10 at 6:19
    
What's z? I use cf only. –  mea Feb 2 '10 at 6:32
    
In GNU tar the 'z' option tells it to compress with gzip after the tar is put together. The tar cvzf command becomes a single tar and compress. I hope your FTP program knows what to do with a tgz file? (same as tar.gz) –  pavium Feb 2 '10 at 6:55
    
Also "j" will use bzip2 compression (slightly better, as I mentioned). It is, however, slower than gzip compression. –  CarlF Feb 2 '10 at 15:01

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.