[clug] kernel options

Matthew Hawkins matt at mh.dropbear.id.au
Wed Aug 6 11:52:00 EST 2003


Daniel said:
> /Inbox/subfolders# cp -av Dan01/* Dan02/
> -su: /bin/cp: Argument list too long

Bingo!

You're not running into any file descriptor problem at all.  You've simply
exhausted the available command-line length for your shell.  Or, in more
simple terms, your argument list is too long ;)
There's actually a few ways around this.  One is to use xargs...

# find Dan01 | xargs cp \{\} Dan02
(apologies if the syntax is incorrect, I'm working from vague, happy
memories of the last time I got to use a real computer).  I mention this
solely because its the reason xargs exists, and is useful for every
command (not just cp)
But perhaps shorter and just as useful is to simply tell cp to recurse:
# cp -aRv Dan01/ Dan02

For my own mail, I have procmail automatically sort incoming mail into a
folder by month, and maildirs for the relevent lists and whatever else I
want to break my mail up into under this.  Mutt is configured to
automatically set the current month to the default (so the shortcuts like
'=' mean this month), but naturally I still get access to any month I
want.  The only caveat is having a running mutt span a change in months -
naturally it doesn't pick up the change - I have to restart it (oooh, poor
baby ;)I scammed this config off the 'net somewhere, if anyone is interested I'll
pass it on next time I'm home (this weekend), just drop me an email.
-- 
Matt





More information about the linux mailing list