Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 22 Dec 2012 06:22:44 -0800 (PST)
From:      Jack Mc Lauren <jack.mclauren@yahoo.com>
To:        FreeBSD Global Users Mailing List <freebsd-questions@freebsd.org>
Subject:   exclude directories from find command
Message-ID:  <1356186164.16227.YahooMailNeo@web160104.mail.bf1.yahoo.com>

next in thread | raw e-mail | index | archive | help
Hi fellas=0AHow can I exclude specific directories from my find command ? I=
 want to look for all files in the whole system except for those in e.g /ex=
tra directory.=A0=0AI use this command to find all files, but how can I exc=
lude /extra directory ?=0A=0Afind / -type f=0A=0AThanks in advance ...=A0
From owner-freebsd-questions@FreeBSD.ORG  Sat Dec 22 14:36:32 2012
Return-Path: <owner-freebsd-questions@FreeBSD.ORG>
Delivered-To: freebsd-questions@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
 by hub.freebsd.org (Postfix) with ESMTP id B22B654E
 for <freebsd-questions@freebsd.org>; Sat, 22 Dec 2012 14:36:32 +0000 (UTC)
 (envelope-from jan0sch@gmx.net)
Received: from mout.gmx.net (mout.gmx.net [212.227.17.21])
 by mx1.freebsd.org (Postfix) with ESMTP id 364558FC12
 for <freebsd-questions@freebsd.org>; Sat, 22 Dec 2012 14:36:31 +0000 (UTC)
Received: from mailout-de.gmx.net ([10.1.76.20]) by mrigmx.server.lan
 (mrigmx001) with ESMTP (Nemesis) id 0LpAT4-1T7bGF03pk-00exr0 for
 <freebsd-questions@freebsd.org>; Sat, 22 Dec 2012 15:36:31 +0100
Received: (qmail invoked by alias); 22 Dec 2012 14:36:30 -0000
Received: from dslb-088-072-201-140.pools.arcor-ip.net (EHLO
 magni.rostock.home) [88.72.201.140]
 by mail.gmx.net (mp020) with SMTP; 22 Dec 2012 15:36:30 +0100
X-Authenticated: #1545395
X-Provags-ID: V01U2FsdGVkX1/bqQ9kpYbbMdc4iUYedpp6eMFPklNbABE/xxCTLj
 oBO1C206hbUe3f
Date: Sat, 22 Dec 2012 15:36:11 +0100
From: Jens Jahnke <jan0sch@gmx.net>
To: freebsd-questions@freebsd.org
Subject: Re: exclude directories from find command
Message-Id: <20121222153611.446b731c99928bbc16183eb8@gmx.net>
In-Reply-To: <1356186164.16227.YahooMailNeo@web160104.mail.bf1.yahoo.com>
References: <1356186164.16227.YahooMailNeo@web160104.mail.bf1.yahoo.com>
X-Mailer: Sylpheed 3.3.0 (GTK+ 2.24.6; amd64-portbld-freebsd8.3)
X-Face: &?!P`87-36gaG)/K:<EQ, A6bQ\ME-jmsrMqYr*z_1d*@tjZja\u_@04mC,
 zXd~7TCbe<df+~FA$e,
 D!}QtXdzO%0B+hFPItF`1XU<A0<'SGy[hKl"xs4#{/{6/II}Vs^]<X8Y+F?Aaed/A/1]0?Bwq/IEq9C-HsjqzzUZ{OCJ(xC@s&b-U$!K[&c'm1Sj.SHrrW]sxIUp!H1ynlS}N9LxXmZY>yi&ixw=uy]y'?$vrc
Mime-Version: 1.0
Content-Type: multipart/signed; protocol="application/pgp-signature";
 micalg="PGP-SHA512";
 boundary="Signature=_Sat__22_Dec_2012_15_36_11_+0100_ofgUoBeea.UQcNmI"
X-Y-GMX-Trusted: 0
Cc: Jack Mc Lauren <jack.mclauren@yahoo.com>
X-BeenThere: freebsd-questions@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: User questions <freebsd-questions.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/options/freebsd-questions>, 
 <mailto:freebsd-questions-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-questions>;
List-Post: <mailto:freebsd-questions@freebsd.org>
List-Help: <mailto:freebsd-questions-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-questions>, 
 <mailto:freebsd-questions-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sat, 22 Dec 2012 14:36:32 -0000

--Signature=_Sat__22_Dec_2012_15_36_11_+0100_ofgUoBeea.UQcNmI
Content-Type: text/plain; charset=US-ASCII
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hi,

On Sat, 22 Dec 2012 06:22:44 -0800 (PST)
Jack Mc Lauren <jack.mclauren@yahoo.com> wrote:

JML> How can I exclude specific directories from my find command ? I
JML> want to look for all files in the whole system except for those in
JML> e.g /extra directory. I use this command to find all files, but
JML> how can I exclude /extra directory ?
JML>=20
JML> find / -type f

what about "find / -type f | grep -v ^\/extra" ? ;)

Regards

--=20
22. Julmond 2012, 15:33
Homepage : http://www.jan0sch.de

For flavor, instant sex will never supersede the stuff you have to peel
and cook.
		-- Quentin Crisp

--Signature=_Sat__22_Dec_2012_15_36_11_+0100_ofgUoBeea.UQcNmI
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (FreeBSD)

iQG8BAEBCgAGBQJQ1cVtAAoJED2+SXzzbciGh20M/1rsQxpMtGfaJGOOL3c05Tjz
i9oP7UcgMK+AC6ebK/7Q31tFP6UTuNYSl28BTSZEn1BNYErwugeZhKk8nD9qQQD+
ER7dC77r2M5kTPFxOzS5hCK5xobv9zIRxY+AQs+oCqwTUFcbt4tiHBhz7kp2FYUr
d+RfxOZw8oYmZdUII8rAmbwi/Wxe1TqcayPOz07oW1XTJyC+t/iDzEKUMUESYLfB
yb5+1ijkpJHOLd8eO+volOMkNc09W6uB6PgJQ9sSZRjX7MYrkcwuDoznb9FE9e2m
TEaSZydpZePS4IS3X1xasvakT0mm1x1qgcckItRlDjK54ebeOC20QGOqAic6ilqj
p5YznA2J00ZO9cUY5aJXhXXR0JjYFNSnVR53Bhpk7dM5qDBT0fUnapqimmUo9Gw4
9EGXN0udoPhdxjis+3FJxB/z6qEBpww98sIvbIenYNmEEYHpZzUDYP6qQMWTV6vW
N6TgfCgqRpXEMri29q97Y4t+layorSKzy+0WL3Nd7yLiQh3+sS0KhI6T0htgu34Y
/9KLdWr3mdCszz2RLLQB
=Bf2M
-----END PGP SIGNATURE-----

--Signature=_Sat__22_Dec_2012_15_36_11_+0100_ofgUoBeea.UQcNmI--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1356186164.16227.YahooMailNeo>