On 29-12-2014 17:42, Hylton Conacher (ZR1HPC) wrote:
Hi,
I am endeavouring to print a list of my Maildir folders to a file so that I can use that same list when I construct a Procmailrc file.
Initially I ran ~> find $HOME/Maildir -type d -print | sort > /home/hylton/maillistdir
**sample snip*** /home/hylton/Maildir/.INBOX.A-F.Bookstores.Kalahari /home/hylton/Maildir/.INBOX.A-F.Bookstores.Kalahari/courierimapkeywords /home/hylton/Maildir/.INBOX.A-F.Bookstores.Kalahari/cur /home/hylton/Maildir/.INBOX.A-F.Bookstores.Kalahari/new /home/hylton/Maildir/.INBOX.A-F.Bookstores.Kalahari/tmp ********
I noticed that there were many sub-folders I did not need. Given this list ended up being 273pg, after a short stint at editing it I decided there had to be a way to exclude certain folders.
What I need is the namesand paths of the folders ie /home/hylton/Maildir/.INBOX.A-F.Bookstores.Kalahari
, not the /cur, /tmp, /new or even the /courierimapkeywords sub-folders.
So far I have:
~> find $HOME/Maildir -type d \( ! -name tmp \) -o \( ! -name cur \) -o \( ! -name new \) -o \( ! -name courierimapkeywords \) | -print | sort > /home/hylton/maillistdir
The above command returns a 'Command not found' in my destination file of maillistdir.
or try this: find $HOME/Maildir -type d | \ grep -v -e '/new' -e '/tmp' -e '/cur' | \ sort -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org