* 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. >> 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? c -- \black\trash movie _C O W B O Y_ _C A N O E_ _C O M A_ Ein deutscher Western/A German Western -->> http://www.blacktrash.org/underdogma/ccc.html -->> http://www.blacktrash.org/underdogma/ccc-en.html