RE: unix question

  • From: "Lafond, Eileen" <Eileen.Lafond@xxxxxxxxxxx>
  • To: "programmingblind@xxxxxxxxxxxxx" <programmingblind@xxxxxxxxxxxxx>
  • Date: Thu, 7 Oct 2010 10:20:11 -0700

Hi,
Iwas successful with the following find command for deleting the .log files 
older than 30 days and then I changed the ls to rm -f and removed them 
successfully.

My question now is is there a way to incoorporate in this code a way to count 
the number of the output files when I do the find ls command?  I have found 
several commands but they appear to be only for counting the files in a 
directory.

My code follows:
find '/home/faserv/hrprod/cron/logs' -name '*.log' -type f -mtime +30 -exec ls  
{} \;

Eileen

Other related posts: