LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-15-2014, 07:01 AM   #1
manalisharmabe
Member
 
Registered: Dec 2010
Posts: 242

Rep: Reputation: 1
Question 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
 
Old 07-15-2014, 08:11 AM   #2
netnix99
Member
 
Registered: Jun 2011
Distribution: redhat, CentOS, OpenBSD
Posts: 298

Rep: Reputation: 98
What commands have your tried?
 
Old 07-15-2014, 08:26 AM   #3
eklavya
Member
 
Registered: Mar 2013
Posts: 619

Rep: Reputation: 136Reputation: 136
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
 
Old 07-15-2014, 09:29 AM   #4
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fc-15/ fc-20-live-usb/ aix
Posts: 5,027

Rep: Reputation: 845Reputation: 845Reputation: 845Reputation: 845Reputation: 845Reputation: 845Reputation: 845
maybe something like:
Code:
scp file.1 user@host:/whatever/floats/your/boat &
scp file.2 user@host:/whatever/floats/your/boat &
 
1 members found this post helpful.
Old 07-16-2014, 05:30 AM   #5
manalisharmabe
Member
 
Registered: Dec 2010
Posts: 242

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by schneidz View Post
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?
 
Old 07-16-2014, 09:10 AM   #6
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fc-15/ fc-20-live-usb/ aix
Posts: 5,027

Rep: Reputation: 845Reputation: 845Reputation: 845Reputation: 845Reputation: 845Reputation: 845Reputation: 845
Quote:
Originally Posted by manalisharmabe View Post
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.
 
Old 07-16-2014, 09:33 AM   #7
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,130
Blog Entries: 2

Rep: Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825
Having parallel uploads will likely not boost upload speed, since that should already be capped with one upload.
 
Old 07-16-2014, 09:45 PM   #8
maples
Member
 
Registered: Oct 2013
Location: IN, USA
Distribution: Arch, Debian Jessie
Posts: 810

Rep: Reputation: 264Reputation: 264Reputation: 264
why not
Code:
 scp file1 file2 file3 file4 file5 user@host:/path/to/destination/
It works for me...
 
Old 07-17-2014, 01:17 AM   #9
karim.ouda
Member
 
Registered: Jun 2013
Posts: 41

Rep: Reputation: 3
Quote:
Originally Posted by maples View Post
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...
Click image for larger version

Name:	progress-css.jpg
Views:	18
Size:	9.6 KB
ID:	15930
 
Old 07-17-2014, 08:04 AM   #10
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fc-15/ fc-20-live-usb/ aix
Posts: 5,027

Rep: Reputation: 845Reputation: 845Reputation: 845Reputation: 845Reputation: 845Reputation: 845Reputation: 845
Quote:
Originally Posted by karim.ouda View Post
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] SCP Copy files JJJCR Linux - Server 8 12-12-2013 02:51 AM
[SOLVED] How do I scp all files except for ... ? ccornchip Linux - Newbie 4 03-07-2011 05:28 AM
Zgrep mulitple zip files tekvaio Linux - Newbie 1 09-25-2008 05:31 PM
copy files....using scp help me suguname Mandriva 2 01-26-2005 02:14 AM
copy files....using scp help me suguname Mandriva 5 01-25-2005 06:42 AM


All times are GMT -5. The time now is 05:10 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration