Denis Beauchemin Denis.Beauchemin at USHERBROOKE.CA
Wed Aug 28 13:34:25 IST 2002


Whenever there are too many files for one command you can use the
following trick:
cd /root/mail/
find . -type f -print0 | xargs -0 /usr/local/bin/df2mbox

The find command prints the names of all files in the current directory,
followed by a null character (makes it easier to work with file names
including spaces or special characters).  The xargs command takes care
to split the file names list in chunks that will not produce the
"Argument list too long" error while calling your command.

> [root at linuxgw MailArchive]# cd /root/mail/
> [root at linuxgw mail]# /usr/local/bin/df2mbox /var/spool/MailArchive/*
> bash: /usr/local/bin/df2mbox: /bin/sh: bad interpreter: Argument list too long

Denis Beauchemin, analyste
Université de Sherbrooke, S.T.I.
T: 819.821.8000x2252 F: 819.821.8045

More information about the MailScanner mailing list