exclude directories from find command

Jens Jahnke jan0sch at gmx.net
Sat Dec 22 14:36:32 UTC 2012


Hi,

On Sat, 22 Dec 2012 06:22:44 -0800 (PST)
Jack Mc Lauren <jack.mclauren at 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> 
JML> find / -type f

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

Regards

-- 
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 704 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20121222/9e46354b/attachment.sig>


More information about the freebsd-questions mailing list