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 here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
df -k and deleting files ajayr111 UNIX for Dummies Questions & Answers 4 03-14-2007 04:03 PM
Deleting Files bc4 UNIX for Dummies Questions & Answers 1 01-25-2007 07:27 PM
Deleting files BG_JrAdmin SUN Solaris 1 11-28-2006 09:17 PM
Deleting old files shiroh_1982 Shell Programming and Scripting 2 06-21-2006 01:42 AM
deleting files in folder amon Shell Programming and Scripting 10 02-21-2006 06:48 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-16-2005
Registered User
 

Join Date: Jun 2005
Posts: 5
Deleting the files

Hi,
I've to delete certain files older than X days from a Maintenance server.
I'm doing this using

find . -name lds\* -mtime $X \
-exec ls -l {} \;

find . -name lds\* -mtime $X \
-exec rm -fR {} \;

As well as I've to delete the files from another FTP server which are again older than X days.
For this again earlier I was using the same thing as above. but now the Clients have made their system as sFTP and hence this command doesnot work any longer.
Any clue how I can store the names of the files deleted from the Maintenance Server in a temp file and then read that temp file while deleting from the sFTP server.
I'm pretty new to UNIX..still learning. so any help with complete commands would be appreciated.
Also if there's any better easier way than what I'm thinking for this task woud be gr8..
Pls post replies..
thanks in adv.
Reply With Quote
Google The UNIX and Linux Forums
Forum Sponsor
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 06:25 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0