Re: Little regex help please - I think

Top Page
Attachments:
Message as email
+ (text/plain)
+ (text/html)
+ governor3k3-TICKTICKER.png (image/png)
+ (text/plain)
Delete this message
Reply to this message
Author: tickticker
Date:  
To: Main PLUG discussion list
Subject: Re: Little regex help please - I think
just testing:

find "/home/[a-z]*/Maildir/.Trash/cur" -mtime +7

to debug and just list files yielded

find: /home/[a-z]*/Maildir/.Trash/cur: No such file or directory

If i'm way off the mark here, and this won't work, could someone point
me in the right direction for doing this please?

Thanks,

Tickticker

Eric "Shubes" wrote:

> 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
>>
>
> I don't know for sure, but I'd try putting the directories spec in
> double quotes, e.g.
> find "/home/[a-z]*/Maildir/.Trash/cur" -mtime +30 -exec rm {} \;
> bash will try to resolve the regex otherwise, instead of feeding it to
> find.
>


--
Transforming Intelligent Construct Keen on Thorough Infiltration,
Ceaseless Killing and Efficient Repair <http://cyborg.namedecoder.com>

---------------------------------------------------
PLUG-discuss mailing list -
To subscribe, unsubscribe, or to change you mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss