Little regex help please - solved - I think

tickticker tickticker at cox.net
Thu Sep 7 18:57:57 MST 2006


Howdy,

i believe that the line:

cd /home/virtual; find [a-z]*/Maildir/.Trash/cur -mtime +30

gives me the list i need (#1 in your list) so that

cd /home/virtual; find [a-z]*/Maildir/.Trash/cur -mtime +30 -exec rm {} \;

is the final solution

Thanks for all your help!!!  I really have to buy a regex book i 
suppose, and I hear O'Reilly has a good one

-Tickticker



Joseph Sinclair wrote:

>A couple thoughts:
>1) Consider just changing the directory to your home directory before running the find command, that would certainly simplify things.
>2) You have un-escaped  special characters in the find expression.   Make sure you've properly escaped all of the characters in the expression that need it.
>3) You're confusing the path and test parameters to find, try this: find /home -regex [a-z]*/Maildir/\.Trash/cur -mtime +30
>
>tickticker wrote:
>  
>
>>Howdy,
>>
>>I'm trying to delete some old files in several directorys using find, but I want 
>>to schedule the job nightly.  Issue is, i can run it from the directory like so:
>>
>>find [a-z]*/Maildir/.Trash/cur -mtime +30 -exec rm {} \;
>>
>>to delete all my different accounts old mail, but the cron job would need the 
>>whole path i'm assuming... But when I run
>>
>>find /home/[a-z]*/Maildir/.Trash/cur -mtime +30
>>
>>it just sits there, i'm assuming it's my [a-z]* sitting there in the middle of 
>>things.  Being regex ignorant, and not finding anything helpful on the web, is 
>>there some way to do this?  backticks or escapes or something?
>>
>>Thanks in advance,
>>
>>Tickticker
>>
>>
>>-- 
>>Transforming Intelligent Construct Keen on Thorough Infiltration, Ceaseless 
>>Killing and Efficient Repair <http://cyborg.namedecoder.com>
>>
>>
>>------------------------------------------------------------------------
>>
>>---------------------------------------------------
>>PLUG-discuss mailing list - PLUG-discuss at lists.plug.phoenix.az.us
>>To subscribe, unsubscribe, or to change  you mail settings:
>>http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
>>    
>>
>---------------------------------------------------
>PLUG-discuss mailing list - PLUG-discuss at lists.plug.phoenix.az.us
>To subscribe, unsubscribe, or to change  you mail settings:
>http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
>
>  
>

-- 
Transforming Intelligent Construct Keen on Thorough Infiltration, 
Ceaseless Killing and Efficient Repair <http://cyborg.namedecoder.com>
-------------- next part --------------
Skipped content of type multipart/related


More information about the PLUG-discuss mailing list