The UNIX Forums
"Join the Network of UNIX System Users"


 
Subject: error while purging files
mainienator
Newbie
Rank: 1



UID 245
Digest Posts 0
Credits 0
Posts 24
Reading Access 10
Registered Apr 25, 2007
Status Offline
Post at Jun 18, 2007 11:02 AM  Profile | P.M. 
error while purging files



error while purging files



find /filearchive/ -type f -mtime +7 -exec rm weblogs*.log {} \;

this worked only if this comand is executed int he unix comand prompt, but when i put this in the shell script it is not recognizing the file.it says weblogs: no such file or directory


am i doing anything wrong here ?


Top
jithinravi
Newbie
Rank: 1



UID 8
Digest Posts 0
Credits 0
Posts 55
Reading Access 10
Registered Apr 25, 2007
Status Offline
Post at Jun 18, 2007 11:03 AM  Profile | P.M. 
shell,

actually this option removes the fiels first and then doing a find over that.what is required is have to find the list of such files and then remove them.
Top
 

 

All times are GMT, the time now is Jul 31, 2010 03:24 AM

Powered by Discuz! 5.0.0  © 2001-2006 UNIX Forums
Processed in 0.004703 second(s), 8 queries

Clear Cookies - Contact Us - UNIX Help - Archiver - WAP