From owner-freebsd-fs@FreeBSD.ORG Thu Mar 7 16:15:49 2013 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 1F416982 for ; Thu, 7 Mar 2013 16:15:49 +0000 (UTC) (envelope-from lars@e-new.0x20.net) Received: from mail.0x20.net (mail.0x20.net [IPv6:2001:aa8:fffb:1::3]) by mx1.freebsd.org (Postfix) with ESMTP id B5752329 for ; Thu, 7 Mar 2013 16:15:48 +0000 (UTC) Received: from e-new.0x20.net (mail.0x20.net [IPv6:2001:aa8:fffb:1::3]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.0x20.net (Postfix) with ESMTPS id 13E1C6A6006; Thu, 7 Mar 2013 17:15:47 +0100 (CET) Received: from e-new.0x20.net (localhost [127.0.0.1]) by e-new.0x20.net (8.14.5/8.14.5) with ESMTP id r27GFkTh046549; Thu, 7 Mar 2013 17:15:46 +0100 (CET) (envelope-from lars@e-new.0x20.net) Received: (from lars@localhost) by e-new.0x20.net (8.14.5/8.14.5/Submit) id r27GFkhb046195; Thu, 7 Mar 2013 17:15:46 +0100 (CET) (envelope-from lars) Date: Thu, 7 Mar 2013 17:15:46 +0100 From: Lars Engels To: Vladislav Prodan Subject: Re: Argument list too long Message-ID: <20130307161546.GV47829@e-new.0x20.net> References: <82112.1362671436.13776555968178880512@ffe17.ukr.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="finhkSr2yyrWw3ow" Content-Disposition: inline In-Reply-To: <82112.1362671436.13776555968178880512@ffe17.ukr.net> X-Editor: VIM - Vi IMproved 7.3 X-Operation-System: FreeBSD 8.3-RELEASE-p4 User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-fs@freebsd.org X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Mar 2013 16:15:49 -0000 --finhkSr2yyrWw3ow Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Mar 07, 2013 at 05:50:36PM +0200, Vladislav Prodan wrote: > Why 12K small files from one directory to cause problems? >=20 > # ll | wc -l > 11467 >=20 > # grep X-PHP-Script * | more > /sbin/grep: Argument list too long. >=20 > # egrep X-PHP-Script *.ua | more > /usr/sbin/egrep: Argument list too long. >=20 > # cat *.ua | grep X-PHP-Script | more > /sbin/cat: Argument list too long. >=20 >=20 >=20 Your shell can't process that many arguments. Use this: grep -R "X-PHP-Script" . or if you don't want to descent into subdirectories: find . -type -f -name '*.ua' -maxdepth 1 -exec grep "X-PHP-Script" {} \+ --finhkSr2yyrWw3ow Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlE4vTIACgkQKc512sD3afjnvACeLHvYfj+ScPgn5mDUUpU9UcBi h2EAn2HctdmTK4zvz2QRS9zEAD2MaMoB =Omb/ -----END PGP SIGNATURE----- --finhkSr2yyrWw3ow--