On 30-12-2014 16:49, Hylton Conacher (ZR1HPC) wrote:
On 29/12/14 18:55, Luuk wrote:
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 OK BUT FYI,
Your command:
:~> find $HOME/Maildir -type d | \grep -v -e `/new' -e /tmp' -e `/cur' -e `/courierimapkeywords' |\ sort > /home/hylton/maillistdir
Resulted in this error:
:~> bash: /new -e /tmp: No such file or directory
COMPARE the two lines, the one i posted here, and the one you types here. i do not know where the back-quotes(`) come from, i typed normal quotes (') -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org