On Wed, 29 Aug 2012 21:59:17 +0200
Jos Chrispijn <[email protected]> wrote:

> Stupic question: I have a directory with 120 logfiles (extension *.log).
> Can someone tell me how I can empty these logfiles in one command?
> I thought 'echo > *.log' would work, but no way K-)

        find . -name \*.log -exec truncate {} \;

        man find and man truncate for the gory details.

-- 
Steve O'Hara-Smith <[email protected]>
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[email protected]"

Reply via email to