Help with SCP command

Hi,
I have around 100 files which are aroun 10 MB in size and need to SCP all those files to another machine.

Could you please suggest which way is efficient to do?

  1. Gzip each file and transfer one by one.
  2. Tar all the files together and then gzip it and send one HUGE file.

Basicaly i need to know if there is any problem if we transfer huge files through SCP command.

Thanks in Advance,
Robin Paulose

scp itself won't have a problem handling large files, as long as your connection can handle it. And if your line is reasonably fast, you'll probably lose more time compressing/decompressing than through the larger data volume.

For the transfer I'd suggest

$ tar -cf - <files> | ssh user@host 'cd <dir>; tar -xf -'

which is (logically) equivalent to

$ tar -cf files.tar <files>
$ scp files.tar user@host:<dir>
$ ssh user@host
on other host
$ cd <dir>
$ tar -xf files.tar

There is no problem with sending the huge file using scp.

I have used scp to send files size in GB's also.

When am trying to SCP a file but am getting an error "lost connection"

Please help.

Command used is like below..
scp -p -B -q "filename" "username@machinename:direectorylocation"