From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 3BDDA138C9D for ; Fri, 17 Apr 2015 21:59:44 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E36F9E093E; Fri, 17 Apr 2015 21:59:35 +0000 (UTC) Received: from mail.digimed.co.uk (82-69-83-178.dsl.in-addr.zen.co.uk [82.69.83.178]) by pigeon.gentoo.org (Postfix) with ESMTP id 99FF5E092A for ; Fri, 17 Apr 2015 21:59:34 +0000 (UTC) Received: from digimed.co.uk (shooty.digimed.co.uk [192.168.1.8]) by mail.digimed.co.uk (Postfix) with ESMTPA id BFB77225AD for ; Fri, 17 Apr 2015 22:59:31 +0100 (BST) Date: Fri, 17 Apr 2015 22:59:27 +0100 From: Neil Bothwick To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] grep -lr ignoring subdirs that start with dot (.)? Message-ID: <20150417225927.25380c30@digimed.co.uk> In-Reply-To: <553173CD.4090801@libertytrek.org> References: <553173CD.4090801@libertytrek.org> Organization: Digital Media Production X-Mailer: Claws Mail 3.11.1-84-gc45ba3 (GTK+ 2.24.27; x86_64-pc-linux-gnu) X-GPG-Fingerprint: 7260 0F33 97EC 2F1E 7667 FE37 BA6E 1A97 4375 1903 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; boundary="Sig_/PZV/7ZtYgk4C=Ez3/2jjUmG"; protocol="application/pgp-signature" X-Archives-Salt: 36688f12-1ab9-4191-908f-d63b2fea4d7c X-Archives-Hash: a489576bbf02c5ec04ce79203afebf18 --Sig_/PZV/7ZtYgk4C=Ez3/2jjUmG Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Fri, 17 Apr 2015 16:57:49 -0400, Tanstaafl wrote: > So, from the target users top level Maildir: >=20 > grep -lr * | xargs ls -lt >=20 > ^^^ appears to work, and does return results for the cur and new > subdirs, but seems to be ignoring the rest of the Maildirs. Maybe it has > something to do with the fact that they start with dots (ie, .Sent, > .Trash, etc)?? >=20 > Anyone have any idea why the above doesn't search them all? The shell expands * to the contents of the current directory, excluding hidden files. It's not grep's doing it is the shell expansion that is catching you out. Since you want to search the entire contents f the current directory, there is no need to pass grep a list of directories (especially not an incomplete list), use "grep -lr ." --=20 Neil Bothwick Bug: (n.) any program feature not yet described to the marketing department. --Sig_/PZV/7ZtYgk4C=Ez3/2jjUmG Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAlUxgj8ACgkQum4al0N1GQNutgCggXJc+CALTGzZs3yoxDREqoWn hpYAniDTco0no6QcMd36zbweQi5HZ/Na =avYY -----END PGP SIGNATURE----- --Sig_/PZV/7ZtYgk4C=Ez3/2jjUmG--