The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
create a shell script that calls another script and and an awk script magikminox Shell Programming and Scripting 0 06-26-2008 02:50 AM
help me in sending parameters from sqlplus script to unix shell script Hara Shell Programming and Scripting 2 01-29-2008 02:31 PM
Shell Script: want to insert values in database when update script runs ring Shell Programming and Scripting 1 10-25-2007 03:06 AM
after server disconnect ftp tranfer...... happyv Shell Programming and Scripting 2 12-20-2006 08:47 PM
How can I tranfer an OS/ Unix (from old HD to new HD / include all files saved ) Vietnam UNIX for Dummies Questions & Answers 0 08-04-2006 11:27 PM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 10-04-2008
Registered User
 

Join Date: Oct 2008
Posts: 1
FTP tranfer script

Hello everyone

I have two UNIX servers and every day I want to automatically move files from server2 to server1 every day
Server1 Folder
/mkg/billing

Server2 Folder
/lh2/kly/billing

I need a FTP file transfer script, plus I don’t need the same files from server2 move every day only the files that was created that day on server2

thanks
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 10-04-2008
...@...
 

Join Date: Feb 2004
Location: NM
Posts: 5,214
Code:
find /path/to/files/on/server2 -type f -mtime -1 > tmpfile
awk ' BEGIN {  print "OPEN server1"
                    print "USER yourusername yourpassword"
                    print "cd /path/to/files/on/server1"
                    print "lcd /path/to/files/on/server2"
                    print "verbose "
                  }
                  { print "put ", $0 }
         END { print "bye" } ' tmpfile | ftp -n > /path/to/ftp/log
Try this for a starting point.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Bookmarks

Tags
None

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:




All times are GMT -4. The time now is 08:29 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66