lkml.org 
[lkml]   [2002]   [Nov]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: File Limit in Kernel?
On Tue, Nov 12, 2002 at 11:01:49AM -0500, Kent Borg wrote:
> On Tue, Nov 12, 2002 at 10:38:55AM -0500, Adam Voigt wrote:
> > I have a directory with 39,000 files in it, and I'm trying to use the cp
> > command to copy them into another directory,
> > [...]
> > "argument list too long"
> No, it is not a kernel limit, it is a limit to your shell (bash, for
> example). Look at xargs to get around it.

From "man execve":

E2BIG The argument list is too big.

From "man sysconf":

_SC_ARG_MAX
The maximum length of the arguments to the exec()
family of functions; the corresponding macro is
ARG_MAX.

On my RedHat 8.0 box:

$ getconf ARG_MAX
131072

It is definately a kernel limitation, although as other people have
pointed out, there are common userspace solutions to the problem.

mark

--
mark@mielke.cc/markm@ncf.ca/markm@nortelnetworks.com __________________________
. . _ ._ . . .__ . . ._. .__ . . . .__ | Neighbourhood Coder
|\/| |_| |_| |/ |_ |\/| | |_ | |/ |_ |
| | | | | \ | \ |__ . | | .|. |__ |__ | \ |__ | Ottawa, Ontario, Canada
One ring to rule them all, one ring to find them, one ring to bring them all
and in the darkness bind them...

http://mark.mielke.cc/

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:30    [W:0.183 / U:0.080 seconds]
©2003-2011 Jasper Spaans. Advertise on this site