The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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 03: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 09: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

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 10-04-2008
sheriweb sheriweb is offline
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
  #2 (permalink)  
Old 10-04-2008
jim mcnamara jim mcnamara is offline Forum Staff  
...@...
  
 

Join Date: Feb 2004
Location: NM
Posts: 5,715
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.
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 04:57 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
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