Sponsored Content
Top Forums UNIX for Dummies Questions & Answers How to Transfer a LIST of FILES? Post 302741613 by Yoda on Sunday 9th of December 2012 12:30:22 PM
Old 12-09-2012
Assuming you have ssh-keys setup for password-less login between server A and server B you can use SFTP by creating batch files with the list of files to transfer:-
Code:
for file in /var/www/files/file1.txt /var/www/files/file1f.txt /var/www/files/file2g.txt
do
   awk ' { 
    print "put " $0; 
   }' $file > sftp_batch.cntrl            # creating batch file.
   sftp -b sftp_batch.cntrl user@server_B # transferring using batch file
done

 

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

How do i transfer files

Im trying to transfers a file from one unix server to another , make some changes and then send it back to the original server. All this using modems. I've been using "cu" and i can "get" the file but i can't "put" it. Besides I need to do this using a shell script. I can write a script to get... (4 Replies)
Discussion started by: phsoft
4 Replies

2. UNIX for Dummies Questions & Answers

How to transfer files

(0 Replies)
Discussion started by: spoonman
0 Replies

3. UNIX for Dummies Questions & Answers

How to transfer files

please help me to transfer files from one server to another one i am having problem in it thanks (1 Reply)
Discussion started by: pankaj001np
1 Replies

4. Shell Programming and Scripting

Transfer Of Files

How to transfer the files in windows server to the unix server by using the unix or ftp commands? (1 Reply)
Discussion started by: vinay123
1 Replies

5. Shell Programming and Scripting

Help needed to transfer list of files to FTP server, to different folders

Hello Unix Gurus, Help required from you. My requirement is something like this I want to create a concurrenct program in Oracle Applications using shell script to transfer files from Apps Server to destination FTP server. I have created custom program, where I will extract all the... (4 Replies)
Discussion started by: amazon
4 Replies

6. HP-UX

Transfer Files from Windows to HP-UX

I need to transfer files from Windows to Hp-UX box with out any software(Filezilla ...., Fsecure file transfer) Is it possible to transfer using command prompt ? (6 Replies)
Discussion started by: girija
6 Replies

7. Shell Programming and Scripting

Script to transfer files

Hi, I am new to scripting, I need to write a script to transfer .TXT files from Server A (ftp) to Server B. Once the files in server B i need to transfer it to server C (sftp). (not transfer of files directly from server A to Server C ) Thanks! Regards Sendhil ---------- Post updated at... (3 Replies)
Discussion started by: Sendhil.Kumaran
3 Replies

8. Linux

How to transfer files...

Hi guys, ok so, how do you go about networking between Windows and Linux so that I can transfer files between each other? (5 Replies)
Discussion started by: billcrosby
5 Replies

9. UNIX for Beginners Questions & Answers

Not able to transfer files using between server A and B

Hi All, I have generated public and private pair to avoid to enter password manually while sending files through sftp. But still I am facing issues and every-time prompt asking enter password. Below are steps I fallowed to make ssh connection between two servers. 1. Generated public and... (5 Replies)
Discussion started by: renukeswar
5 Replies
SENDFILE(1)						      General Commands Manual						       SENDFILE(1)

NAME
fetchfile - fetch file(s) via O-SAFT protocol SYNOPSIS
fetchfile [ -46lakdPriqQvVI ] [ -f user ] [ -s [user@]server ] [ -C[wr]=conffile ] filename fetchfile [ -lakdPriqQvVI ] [ -f user ] [ -s [user@]server ] [ -C[wr]=conffile ] -n filenumber DESCRIPTION
fetchfile fetches files from a SAFT server to the local user spool. In the SAFT server spool there must lay your sendfile public key to identify yourself. This key can be generated by the fetchfile -I com- mand and has to be transfered to the SAFT server at the very first time. This prevents other people to steal your files. You may list or fetch your files from the server. But remember, they are stored first in your local sendfile spool. You have to call receive to really receive them to your current directory. OPTIONS
-4, -6 Explicitly force IPv4 or IPv6 connections. By default, the program will try to resolve the name given, and choose the appropriate protocol automatically. If resolving a host name returns both IPv4 and IPv6 addresses, fetchfile will try to use the adresses in the order they are returned by the resolver. -l Only list the files on the server. -a Fetch all files. -k Keep files on server after fetching. -d Delete files without receiving. -n Specify the file number instead of the file name. -r Call receive automaticly afterwards. -f user Restrict file selection to this specifc user. -V Show version information and exit. -v Be verbose and show SAFT protocol messages. -P Send files to stdout directly. -i Ignore testing whether file has been already fetched. -q Quiet mode 1: print no transfer messages. -Q Quiet mode 2: print no transfer, information or warning messages. -I Initialize fetchfile and the pgp key pair. -s [user@]host Specify an alternate saft server and/or alternate user. -Cr=conffile Read configuration file "config" or "restrictions" from server. -Cw=conffile Write configuration file "config" or "restrictions" to server. ARGUMENTS
filename or filenumber Specify the name of the file or its number (with option -n). EXAMPLES
fetchfile -l fetchfile -a fetchfile -Cr=config -s saft.belwue.de FILES
/var/spool/sendfile/$USER/ Your local spool directory. $HOME/.sfspool/ Your local private spool directory if /var/spool/sendfile/$USER/ does not exist. config, restrictions Your configuration files for the server. See sendfile(1) for a description. SEE ALSO
receive(1), sendfile(1), fetchfile(7), sendfiled(8). AUTHOR
Ulli Horlacher - framstag@rus.uni-stuttgart.de 3rd Berkeley Distribution SENDFILE(1)
All times are GMT -4. The time now is 02:50 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy