On Tue, Dec 30, 2014 at 9:41 AM, Hylton Conacher (ZR1HPC)
Hi Patrick,
On 29/12/14 20:10, Patrick Shanahan wrote:
* Hylton Conacher (ZR1HPC)
[12-29-14 11:45]: [...] 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.
I have RTFM'd, Googled and still cannot find an example of what I want to do. I even visited the sites Aaron Digulla gave me on an earlier pointing to the complexities of find.
Any more help appreciated
As you are not familiar with "find", go with what you have and use "grep -v" Grep works by line and "-v" reverses search to lines not containing and you could tack onto the end of your present "find", | egrep -v "/new"\|"/cur"\|"/tmp" > /home/hylton/maillistdir
negative targets include forward slashes and are quoted to hopefully not find matching directories you desire.
Tnx
Following your lead I extended the cmd to be :~> find $HOME/Maildir -type d | egrep -v "/new"\|"/cur"\|"/tmp"\|"/courie*"\ -print |sort > /home/hylton/maillistdir
however on viewing the maillistdir file, the /courierimapkeywords folder is still listed?
Because you try to match pattern "/courie* -print". Remove "\ -print", it is in the wrong place and is not needed. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org