Concatenate files over FTP

6

I have a list of files on an FTP server that I would like to concatenate remotely. They are quite large, so I would prefer not to download them.

The reason I'm in this situation is because I originally thought it would be easy to do, so I split a 1.1GB file up into 50MB files and uploaded those. This allowed me to send multiple files in parallel, which goes much faster with the proxy I'm using. If someone has an alternative suggestion (assuming remote concatenation is not possible!) then I would appreciate knowing that too.

Thanks!

PS: This is my first time on Super User. I hope this type of question is warranted.

marcog

Posted 2009-08-29T13:25:09.647

Reputation: 2 384

1Welcome to superuser. Your question is perfectly valid. – Chris W. Rea – 2009-08-29T16:30:09.550

Answers

3

The FTP protocol (and therefore the standard FTP Server) does not allow any server file manipulations besides overwriting them with new copies. Concatenating files uploaded on the server does not seem feasible over FTP.

Check if you have a secure shell (SSH) or at least TELNET login possible on the server to concatenate these files.

To achieve bandwidth performance on an upload (or download for that matter),
multi-part transfers are usually done (example).
If your server supports this, it can be tried for the next upload
(or you can upload again).

For the present situation, you could upload another instructions file (readme.txt),
describing how the parts are to be re-assembled. You could even upload a reassemble script that you have tried with your local split parts.

nik

Posted 2009-08-29T13:25:09.647

Reputation: 50 788

Regarding multi-part transfers, can you refer me to a linux client that supports this? Unfortunately I only have FTP access (I'm uploading to archive.org). – marcog – 2009-08-29T15:22:46.253

1

Unless you've got remote desktop access to the FTP server and can open a session thru Remote Desktop and launch a concatenation program on the server, then the answer is no : the ftp servers I know don't allow remote execution and don't do concatenation.
I'm afraid you'll need to re-upload the unsplit file.

I would also like to add that uploading thru multiple connections doesn't improve the upload time, which stays always limited by your bandwidth. For example, if your upload bandwidth is 20k, then one connection will upload at the speed of 20k, while two connections will upload at the speed of 2X10k=20k. Total gain is then zero. When uploading a large file, it's important to use an FTP client that supports resumes, so in case of disconnection the data already uploaded is not lost and you can later restart from where you stopped.

harrymc

Posted 2009-08-29T13:25:09.647

Reputation: 306 093