RE: unix question

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

Hi,
I couldn't find the reply message in this.

Eileen

-----Original Message-----
From: programmingblind-bounce@xxxxxxxxxxxxx 
[mailto:programmingblind-bounce@xxxxxxxxxxxxx] On Behalf Of Bill Gallik
Sent: Thursday, October 07, 2010 11:06 AM
To: programmingblind@xxxxxxxxxxxxx
Subject: Re: unix question


--------------------------------------------------
From: "Lafond, Eileen" <Eileen.Lafond@xxxxxxxxxxx>
Sent: Thursday, October 07, 2010 12:20 PM
To: <programmingblind@xxxxxxxxxxxxx>
Subject: RE: unix question

> 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
> ��������b{ azX���"��+��b�v�u�Z�
����z�b� �m���� �~���+-��+��b��鮈+ji���
>
If you substitute "wc -l" for the "ls" command that will give you a word 
count per line, in other words it will count the number of file names 
printed into the pipeline.
---
Holland's Person, Bill
- "An idealist is one who, on noticing that a rose smells better than a 
cabbage, concludes that it will also make better soup."
- US Editor and Satirist, H. L. Mencken (1880 - 1956) 

__________
View the list's information and change your settings at 
//www.freelists.org/list/programmingblind

V'�����l�w��f���ڝ�!jxʋ���m�x,j�m�����祊�l��?�+-��肶��)�nX�

Other related posts: