Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Tue, 12 Nov 2002 18:18:00 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Tue, 12 Nov 2002 18:18:00 -0500 Received: from tmr-02.dsl.thebiz.net ([216.238.38.204]:56580 "EHLO gatekeeper.tmr.com") by vger.kernel.org with ESMTP id ; Tue, 12 Nov 2002 18:17:58 -0500 Date: Tue, 12 Nov 2002 18:23:59 -0500 (EST) From: Bill Davidsen To: Adam Voigt cc: linux-kernel@vger.kernel.org Subject: Re: File Limit in Kernel? In-Reply-To: <1037115535.1439.5.camel@beowulf.cryptocomm.com> Message-ID: MIME-Version: 1.0 Content-Type: MULTIPART/SIGNED; MICALG=pgp-sha1; PROTOCOL="application/pgp-signature"; BOUNDARY="=-gjU1b+qYiuNy2hSLpQYr" Content-ID: Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1994 Lines: 55 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. Send mail to mime@docserver.cac.washington.edu for more info. --=-gjU1b+qYiuNy2hSLpQYr Content-Type: TEXT/PLAIN; CHARSET=US-ASCII Content-ID: On 12 Nov 2002, 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, and neither the cp or the > mv command will work, they both same "argument list too long" when I > use: > > cp -f * /usr/local/www/images > > or > > mv -f * /usr/local/www/images > > Is this a kernel limitation? If yes, how can I get around it? > If no, anyone know a workaround? I appreciate it. Sort of, there is a limit to how many k of arguments you can have on a command line. Having grown up with much smaller limits in early UNIX, I got into the habit of using xargs when I wasn't sure. You can avoid one exec per file behaviour by something like: ls | xargs -l50 echo | xargs -i mv "{}" destdir You can also do useful things by using find and the -p option of cpio. -- bill davidsen CTO, TMR Associates, Inc Doing interesting things with little computers since 1979. --=-gjU1b+qYiuNy2hSLpQYr Content-Type: APPLICATION/PGP-SIGNATURE; NAME="signature.asc" Content-ID: Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQA90SCPF9k9BmZXCWYRAqlsAJoCW1C/DfWSlwOiVQulcNLidr8RrACeIEph MgAaBBF1vNaDnpS0rXfC/NI= =Cd37 -----END PGP SIGNATURE----- --=-gjU1b+qYiuNy2hSLpQYr-- - 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/