On Tue, 21 Jul 2009, Christian Ebert wrote:
> * Adam Wellings on Tuesday, July 21, 2009 at 14:52:57 +0100
> > On Tue, 21 Jul 2009, Christian Ebert wrote:
> >> * Adam Wellings on Tuesday, July 21, 2009 at 11:17:09 +0100
> >>> I have a folder hierarchy of maildirs, though only the nodes (or leaves)
> >>> are
> >>> actually maildirs, eg:
> >>>
> >>> fol2
> >>>| -Fol2
> >>>|| -maildira
> >>>|| -maildirb
> >>>| -Fol3
> >>>|| -Fol4
> >>>||| -maildirc
> >>>||| -maildird
> >>>|| -maildire
> >>>| -Fol5
> >>>|| -etc..
> >>>
> >>> This mailboxes command works for me:
> >>>
> >>> mailboxes `find /path/to/mail -type d -name cur printf '%h '`
> >>
> >
> > Firstly sorry, I missed the '-' off printf
>
> I added it to d :( -- but my find implementation doesn't have
> that either.
>
Looking back at your command, I see '-type -d' I missed that.
-d is the depth option. Having -type -d will produce an error.
> >> Sure, but (my find doesn't have printf):
> >>
> >> ~$ time find ~/Mail -type d -name cur -execdir pwd \; > /dev/null
> >>
> >> real 0m54.973s
> >> user 0m0.447s
> >> sys 0m54.159s
> $ time find ~/Mail -type d \( \( -name cur -o -name new -o -name tmp \)
> -prune -o -print \) > /dev/null
>
> real 0m0.019s
> user 0m0.005s
> sys 0m0.014s
>
> > Thanks for that, I've created this command based on the above:
> >
> > mailboxes `find ~/Mail -type d \( \( -name cur -o -name new -o -name tmp \)
> > -prune -o -printf '+%P ' \)`
> >
> > It's cut the time from ~1s to ~0.3s.
>
> And it doesn't give you Fol2 for example, i.e. the nodes as well?
Ah poo, so it does. My excuse is that I'm ill today and a bit under par...
Mutt seems happy enough though (despite my other documented issue) and it's
nice and fast.
Will it (likely) cause problems? I'm going to have to completely re-build my
desktop machine in a month, so I'll probably look into a better solution
(maybe switch mail format or organisation) then. But I don't want any
problems before then.
cheers,
Adam
--
"...one cannot be angry when one looks at a penguin."
- John Ruskin