Date: Wed, 22 Sep 2004 08:26:07 -0700 From: Drew Tomlinson <drew@mykitchentable.net> To: FreeBSD Questions <freebsd-questions@freebsd.org> Subject: Find Command Syntax Message-ID: <4151998F.205@mykitchentable.net>
next in thread | raw e-mail | index | archive | help
[-- Attachment #1 --] I'm trying to write a script to feed the mail in my spam folder to Spamassassin's sa-learn and then delete the mails older than 1 day in that spam folder. Here's my current directory listing: blacklamb> ll /path/to/Maildir/.Spam/cur total 70 -rw------- 1 user group 6118 Sep 22 02:08 1095844100.98444_0.blacklamb.mykitchentable.net:2, -rw------- 1 user group 3545 Sep 22 02:21 1095844907.98477_0.blacklamb.mykitchentable.net:2, -rw------- 1 user group 7408 Sep 22 03:18 1095848327.99825_0.blacklamb.mykitchentable.net:2, -rw------- 1 user group 6560 Sep 22 03:44 1095849842.99908_0.blacklamb.mykitchentable.net:2, -rw------- 1 user group 5203 Sep 22 04:57 1095854240.48102_0.blacklamb.mykitchentable.net:2, -rw------- 1 user group 3313 Sep 22 05:21 1095855688.48172_0.blacklamb.mykitchentable.net:2, -rw------- 1 user group 5718 Sep 22 06:34 1095860049.48407_0.blacklamb.mykitchentable.net:2, -rw------- 1 user group 5254 Sep 22 07:22 1095862947.48525_0.blacklamb.mykitchentable.net:2, -rw-r--r-- 1 user group 23314 Sep 21 18:41 1095863122.M795851P95252V00005B00I0031FB22_1.blacklamb.mykitchentable.net,S=23314:2,S I'm trying to use the find command to do the deleting but am having trouble with the syntax. For testing, I'm using this command: blacklamb> find /path/to/Maildir/.Spam/cur \! -newerct 1d -print blacklamb> It finds nothing. I read in the manual that time specifications don't have much meaning without the '-' or '+' operator so I try adding it: blacklamb> find /usr/home/tomlinson_dr/Maildir/.Spam/cur \! -newerct -1d -print find: Can't parse date/time: -1d blacklamb> find /usr/home/tomlinson_dr/Maildir/.Spam/cur \! -newerct +1d -print find: Can't parse date/time: +1d I've also tried a combination of adding ()'s around the expression but that hasn't worked either. What am I missing? Is this an appropriate choice for what I want to do? Is there another command better suited for this task? Thanks, Drew -- Visit The Alchemist's Warehouse Magic Tricks, DVDs, Videos, Books, & More! http://www.alchemistswarehouse.com [-- Attachment #2 --] 0 *H 010 + 0 *H 0W0 .0 *H 0b10 UZA1%0#U Thawte Consulting (Pty) Ltd.1,0*U#Thawte Personal Freemail Issuing CA0 040918145001Z 050918145001Z0I10UThawte Freemail Member1&0$ *H drew@mykitchentable.net00 *H 0 %>ԤAKijBWՏݱ(3ٔ-ʾ]#O0LI\q$בN&'LZ{v]lQS%!-d i3E.C.I}.U7[,|.Q 4020"U0drew@mykitchentable.net0U0 0 *H S3N;W uDBpT:R}9' ( -P: 6EFNvjȯ!Y;AF|w^jܷi0~uVN {300W0 .0 *H 0b10 UZA1%0#U Thawte Consulting (Pty) Ltd.1,0*U#Thawte Personal Freemail Issuing CA0 040918145001Z 050918145001Z0I10UThawte Freemail Member1&0$ *H drew@mykitchentable.net00 *H 0 %>ԤAKijBWՏݱ(3ٔ-ʾ]#O0LI\q$בN&'LZ{v]lQS%!-d i3E.C.I}.U7[,|.Q 4020"U0drew@mykitchentable.net0U0 0 *H S3N;W uDBpT:R}9' ( -P: 6EFNvjȯ!Y;AF|w^jܷi0~uVN {300?0 0 *H 010 UZA10UWestern Cape10U Cape Town10U Thawte Consulting1(0&UCertification Services Division1$0"UThawte Personal Freemail CA1+0) *H personal-freemail@thawte.com0 030717000000Z 130716235959Z0b10 UZA1%0#U Thawte Consulting (Pty) Ltd.1,0*U#Thawte Personal Freemail Issuing CA00 *H 0 Ħ<UsUNʙZhup[v:aQP 0cZ,p+Z?qV˯<6$*+w=+>@dקe*TH<a@dr` 00U0 0CU<0:08642http://crl.thawte.com/ThawtePersonalFreemailCA.crl0U0)U"0 010UPrivateLabel2-1380 *H HP. fgCL!6-6/P p<ab:~ t%Pb'qW%ݩ9 Oe_N4[5MwV!x!5$F]_eO100i0b10 UZA1%0#U Thawte Consulting (Pty) Ltd.1,0*U#Thawte Personal Freemail Issuing CA .0 + 0 *H 1 *H 0 *H 1 040922152607Z0# *H 1- 8ɮZlwAfY0R *H 1E0C0 *H 0*H 0 *H @0+0 *H (0x +71k0i0b10 UZA1%0#U Thawte Consulting (Pty) Ltd.1,0*U#Thawte Personal Freemail Issuing CA .0z*H 1ki0b10 UZA1%0#U Thawte Consulting (Pty) Ltd.1,0*U#Thawte Personal Freemail Issuing CA .0 *H MZB\Q:wgb_-M}i<Ko5p;⠺7nߙ⛍F )M^^0;XaoSnDJ?ollX`:0ЪX*$GnJ[EkAiOξ]d>A
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4151998F.205>
