Re: [nlug] /var/spool/mail

2012-12-06 Thread David R. Wilson
And who says they wanted the documentation? Dave On Wed, 2012-12-05 at 16:37 -0600, Chris McQuistion wrote: I've been told that I can be replaced by a one-line shell script! (No one would dare, though, because there's no documentation...) Chris On Wed, Dec 5, 2012 at 3:46 PM,

[nlug] /var/spool/mail

2012-12-05 Thread Howard White
So my predecessor set up our customer systems with background jobs writing results to local mail, /var/spool/mail/whomever. Just found one such system whereon the /var partition was nearly full. Is there a logrotate like utility to cull old stuff out of mail files, like on say a days-old

Re: [nlug] /var/spool/mail

2012-12-05 Thread Tilghman Lesher
On Wed, Dec 5, 2012 at 2:01 PM, Howard White hwh...@vcch.com wrote: So my predecessor set up our customer systems with background jobs writing results to local mail, /var/spool/mail/whomever. Just found one such system whereon the /var partition was nearly full. Is there a logrotate like

Re: [nlug] /var/spool/mail

2012-12-05 Thread John R. Dennison
On Wed, Dec 05, 2012 at 02:01:13PM -0600, Howard White wrote: So my predecessor set up our customer systems with background jobs writing results to local mail, /var/spool/mail/whomever. Just found one such system whereon the /var partition was nearly full. Is there a logrotate like utility

Re: [nlug] /var/spool/mail

2012-12-05 Thread Tilghman Lesher
On Wed, Dec 5, 2012 at 2:15 PM, Curt Lundgren verif...@gmail.com wrote: I wrote a Perl script a few years ago that deletes files from a directory that are older than n number of days. We generally set n to 30 days, but you can set it to be anything you want. Just curious as to why you

Re: [nlug] /var/spool/mail

2012-12-05 Thread John R. Dennison
On Wed, Dec 05, 2012 at 02:15:06PM -0600, Curt Lundgren wrote: I wrote a Perl script a few years ago that deletes files from a directory that are older than n number of days. We generally set n to 30 days, but you can set it to be anything you want. Script can be replaced by a one-liner:

Re: [nlug] /var/spool/mail

2012-12-05 Thread Howard White
On 12/05/2012 02:15 PM, Curt Lundgren wrote: I wrote a Perl script a few years ago that deletes files from a directory that are older than n number of days. We generally set n to 30 days, but you can set it to be anything you want. Curt, I am able to delete files like individual log files or

Re: [nlug] /var/spool/mail

2012-12-05 Thread Howard White
On 12/05/2012 02:26 PM, John R. Dennison wrote: On Wed, Dec 05, 2012 at 02:23:35PM -0600, John R. Dennison wrote: And boo on gratuitous forks() :) GNU find can short-circuit via -delete or just dump out to xargs rm :) Oopsie - I missed your use of '+' which effectively duplicates the xargs

Re: [nlug] /var/spool/mail

2012-12-05 Thread John R. Dennison
On Wed, Dec 05, 2012 at 02:33:25PM -0600, Curt Lundgren wrote: Yeah, I'd still do it in Perl. Why? Because I do just about everything in Perl. I've worked with that type of file; it's more programming to make my approach work (probably not worth it.) Larry Wall might observe that there's

Re: [nlug] /var/spool/mail

2012-12-05 Thread Tilghman Lesher
On Wed, Dec 5, 2012 at 3:38 PM, John R. Dennison j...@gerdesas.com wrote: On Wed, Dec 05, 2012 at 02:33:25PM -0600, Curt Lundgren wrote: Yeah, I'd still do it in Perl. Why? Because I do just about everything in Perl. I've worked with that type of file; it's more programming to make my

Re: [nlug] /var/spool/mail

2012-12-05 Thread Jack Coats
Just about all admin job functions can be replaced with a oneliner script (perl or otherwise). The magic is to know which ones matter, which ones are important and not, the timing for each, and the ability to maintain the for the long run. Most admins miss the mark on one or two counts.

Re: [nlug] /var/spool/mail

2012-12-05 Thread Chris McQuistion
I've been told that I can be replaced by a one-line shell script! (No one would dare, though, because there's no documentation...) Chris On Wed, Dec 5, 2012 at 3:46 PM, Jack Coats j...@coats.org wrote: Just about all admin job functions can be replaced with a oneliner script (perl or

Re: [nlug] /var/spool/mail

2012-12-05 Thread Howard White
On 12/05/2012 04:37 PM, Chris McQuistion wrote: I've been told that I can be replaced by a one-line shell script! (No one would dare, though, because there's no documentation...) Chris Thanks Chris. I needed that laugh today. Howard -- You received this message because you are subscribed