The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
re-associating 2 HP UNIX servers RarisRSX UNIX for Dummies Questions & Answers 0 09-28-2007 12:26 PM
Microsoft servers Vs. Unix/Linux tayyabq8 What's on Your Mind? 2 08-25-2007 04:45 PM
Reboot of Unix servers - recommended? polly013 SUN Solaris 13 01-29-2007 07:00 AM
Is ncftp possible between two SCO Unix servers? hrishi10a SCO 0 09-04-2006 06:39 AM
Bouncing Unix Servers mhossien HP-UX 17 03-30-2006 04:31 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 09-03-2008
hpedersen4 hpedersen4 is offline
Registered User
  
 

Join Date: Sep 2008
Posts: 1
Question FTP between two UNIX servers

Hi

I have server A and server B.

On server B the directory is called /tmp/hmp
On server A I want to get the files on server B:/tmp/hmp via FTP. After I have got the files via FTP I have to delete them. In the script below I'm affraid of that I delete files before I get them by ftp.

#!/bin/bash
ftp -in server B<<END_SCRIPT
quote USER abc
quote PASS XXXX
bin
prompt off
cd /tmp/hmp --folder on ftp
lcd /production/hmp --folder on local drive
mget *.*
mdel *.*
bye
END_SCRIPT
  #2 (permalink)  
Old 09-03-2008
zaxxon's Avatar
zaxxon zaxxon is offline Forum Staff  
Moderator
  
 

Join Date: Sep 2007
Location: Germany
Posts: 2,289
Usually ftp clients work serialized so nothing should be deleted before you have transferred them.
You can also just try it out with some dummy files.

Also it's good to post scripts/code with the [ code ] and [ /code ] tags.
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 07:23 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