
04-23-2007
|
 |
Registered User
|
|
Join Date: Mar 2007
Location: Toronto, Canada
Posts: 659
|
|
Quote:
|
Originally Posted by Sepia
I have two servers. I would like to copy some files from one directory on server A into the same directory on server B.
Its not all the files in in the directory, just some of them.
Is there a way to make a file list in a txt file and then somehow copy all the files in that list in one go to the other server?
|
What shell are you using? If it's bash or ksh put the list of files in an array, e.g.:
Code:
filelist=( "file 1" "file 2" etc. )
scp "${filelist[@]}" remote.server:path
Or use the list directly on the command line:
Code:
scp "file 1" "file 2" etc. remote.server:path
|