LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How scp mulitple files simultaeously ? (https://www.linuxquestions.org/questions/linux-newbie-8/how-scp-mulitple-files-simultaeously-4175511145/)

manalisharmabe 07-15-2014 06:01 AM

How scp mulitple files simultaeously ?
 
Hi Guys,

I have 10 files under one folder but i want to scp all file simultaneously to destination folder so as to speed up the copy, is there any way to accomplish this?
I have tried serveral commands but no sucess.

Please advise.

Thanks
Manali

netnix99 07-15-2014 07:11 AM

What commands have your tried?

eklavya 07-15-2014 07:26 AM

You can get this on google very easily.
scp is used for remote copy, if you want to copy in same system, cp is enough. It is not like like scp will do it fast.
Code:

scp /path/of/directory/* IP:/path/of/desstination/directory
Suppose you source path is /tmp/user/myfiles and destination system's IP is 192.168.1.9 and destination folder is in /tmp/user2
Code:

scp  /tmp/user/myfiles/* 192.168.1.9:/tmp/user2
It will copy only files, if youw ant to copy directory, use scp -r

schneidz 07-15-2014 08:29 AM

maybe something like:
Code:

scp file.1 user@host:/whatever/floats/your/boat &
scp file.2 user@host:/whatever/floats/your/boat &


manalisharmabe 07-16-2014 04:30 AM

Quote:

Originally Posted by schneidz (Post 5204180)
maybe something like:
Code:

scp file.1 user@host:/whatever/floats/your/boat &
scp file.2 user@host:/whatever/floats/your/boat &


yes something like this.

but is there any switch which will be used to transfer all files parrally than one after the another?

schneidz 07-16-2014 08:10 AM

Quote:

Originally Posted by manalisharmabe (Post 5204642)
yes something like this.

but is there any switch which will be used to transfer all files parrally than one after the another?

not sure what you are asking but by putting both transfers in the background (&) it will trigger the system to run the 2 scp programs at the same time.

TobiSGD 07-16-2014 08:33 AM

Having parallel uploads will likely not boost upload speed, since that should already be capped with one upload.

maples 07-16-2014 08:45 PM

why not
Code:

scp file1 file2 file3 file4 file5 user@host:/path/to/destination/
It works for me...

karim.ouda 07-17-2014 12:17 AM

1 Attachment(s)
Quote:

Originally Posted by maples (Post 5205069)
why not
scp file1 file2 file3 file4 file5 user@host:/path/to/destination/

It is not parallel copy. It copies another file when it completes first file. It is doing too fast that's why it looks like parallel copy.
Try to copy multiple 700mb files then you will get, it starts another when it completes first.
Parallel copy is something like this...
Attachment 15930

schneidz 07-17-2014 07:04 AM

Quote:

Originally Posted by karim.ouda (Post 5205141)
It is not parallel copy. It copies another file when it completes first file. It is doing too fast that's why it looks like parallel copy.
Try to copy multiple 700mb files then you will get, it starts another when it completes first.
Parallel copy is something like this...
Attachment 15930

but if you have a 25 mb/s connection then 5 files with a throughput of 5 mb/s each would take the same time.


All times are GMT -5. The time now is 03:54 PM.