Re: pattern matching

2001-11-14 Thread dave brett
Thanks to all I will look into both books. david On Tue, 13 Nov 2001, Gordon Messmer wrote: > On Wed, 14 Nov 2001, Cameron Simpson wrote: > > > On Tue, Nov 13, 2001 at 02:48:07PM -0800, Gordon Messmer <[EMAIL PROTECTED]> wrote: > > | I think you want this: > > | find / -type d -maxdepth 1 -ex

Re: pattern matching

2001-11-13 Thread Gordon Messmer
On Wed, 14 Nov 2001, Cameron Simpson wrote: > On Tue, Nov 13, 2001 at 02:48:07PM -0800, Gordon Messmer <[EMAIL PROTECTED]> wrote: > | I think you want this: > | find / -type d -maxdepth 1 -exec du {} \; | egrep -v "/[^/]*/" > > You can make that even simpler: > /.*/ > No need to use [^/] t

Re: pattern matching

2001-11-13 Thread Cameron Simpson
On Tue, Nov 13, 2001 at 02:48:07PM -0800, Gordon Messmer <[EMAIL PROTECTED]> wrote: | I think you want this: | | find / -type d -maxdepth 1 -exec du {} \; | egrep -v "/[^/]*/" You can make that even simpler: /.*/ No need to use [^/] there... | > Would somebody please point me in the d

Re: pattern matching

2001-11-13 Thread Gordon Messmer
On Tue, 13 Nov 2001, dave brett wrote: > This command works the way I want it too: > find / -type d -maxdepth 1 > > This does not > find / -type d -maxdepth 1 -exec du {} \; > It gave the size of all directories. That's what it's supposed to do... Try: find / -type d -maxdepth 1 -exec du -

Re: pattern matching

2001-11-13 Thread Wayne Vosberg
Your find is just fine. It's du that's traversing your subdirectories. Try: # find / -type d -maxdepth 1 -exec du -s {} \; On Tue, 13 Nov 2001 16:04:34 -0600 (CST) dave brett <[EMAIL PROTECTED]> wrote: > Pattern matching is drivingg me nuts. > > This command works the way I want it too: >