[Gllug] bash script to find, list and save log

Matthew King matthew.king at monnsta.net
Wed Aug 20 15:50:26 UTC 2003


On Wed, 2003-08-20 at 10:39, Liam Delahunty wrote:
> Hi,
> 
> I have the following find command to get all the mail spool files that have
> been updated in the last day. [1]
> 
> find /home/spool/mail -mtime -1 \! -type d -exec ls -lh '{}' ';' -print |
> sort >> /tmp/spool.mail.daily.log

"-exec ls -lh {}" does an ls -lh on the directory found
"-print" lists the directory name to stdout.

You want to lose the -print

Matthew

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 196 bytes
Desc: This is a digitally signed message part
URL: <http://mailman.lug.org.uk/pipermail/gllug/attachments/20030820/f567fbec/attachment.pgp>
-------------- next part --------------
-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug


More information about the GLLUG mailing list