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
Find 3 months old log files and remove cvdev SUN Solaris 13 05-22-2008 01:38 PM
find and remove last week dir kunimi UNIX for Dummies Questions & Answers 1 04-14-2008 07:37 AM
question on find and remove command arunkumar_mca UNIX for Dummies Questions & Answers 1 12-11-2007 01:54 AM
FIND and REMOVE HELP NEEDED!!! scooter17 UNIX for Dummies Questions & Answers 3 09-19-2006 02:42 AM
Find and Remove help needed!!!! scooter17 UNIX for Dummies Questions & Answers 1 09-15-2006 02:26 AM

 
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
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 06-24-2002
peter.herlihy peter.herlihy is offline
Registered User
  
 

Join Date: Nov 2001
Location: New Zealand
Posts: 333
find, remove, and ftp......

I have a script that is run each night by cron. This script generates an extract then places it into an 'extracts' folder and also ftp's a copy to another server.

I have set up the script to remove any files in the extracts folder greater than 28 days old (this occurs each time the script is run). This is the command.

find ${WORKdir}/extracts/ -mtime +29 -exec rm {} \; &&

Now I also want this function to occur in the folder on the other server - preferably using ftp. Here is the ftp activity I already have.

if [ -s ${EXTfile} ]
then
ftp -n ${FTPserver} << cmd
user ${FTPid} ${FTPpwd}
cd ${FTPlocation}
lcd ${WORKdir}/extracts
put ${SHORTfile}
quit
cmd
fi

Can FTP do anything like this - by using unix commands somehow?

Last edited by peter.herlihy; 06-24-2002 at 11:29 PM..
 

Bookmarks

Tags
unix commands

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 08:24 AM.


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