[X-Unix] script question (cron - adobefnt*.lst)
Don Montalvo
dmjgraphics at nyc.rr.com
Thu Jan 8 16:02:50 PST 2004
thanks for your help! i'll test tomorrow and will report back.
don
> Hi Don. I can't say much about cron, but in both cases of your find
>string the only thing you're doing is "escaping" the ";" so that the
>executing shell does not interpret it. I'd think both options are just
>alright for cron, since it just spawns a shell to run the specified
>commands. Which shell... that is open to customization. About not going
>into other volumes with find, what you're looking for is the -x flag:
>
>find -x / -name "AdobeFnt*.lst" -exec rm -f {} \;
>
> Read about it in the man page for a more complete explanation than
>what I can reproduce here. Finally, I'd double quote the searched
>string with wild card just to be safe..., call me paranoid!
>
> Hope that helps. Regards,...
>
> Juan
>
>
>On Jan 8, 2004, at 4:58 PM, Don Montalvo wrote:
>
>> i've been trying to create a cron script that will search the entire
>> boot volume for all instances of "AdobeFnt*.lst" and delete those
>> files. here are two scripts (slightly different syntax) that seem to
>> do the trick but i wanted to run it by you guys (my gurus...my
>> gods...my...um...well, you get the idea <g>)...
>>
>> these two seem to do the same thing:
>>
>> find / -name 'AdobeFnt*.lst' -exec rm -f {} \;
>>
>> (and)
>>
>> find / -name "AdobeFnt*.lst" -exec rm -f {} ';'
>>
>> first question: which script is best for using as cron job?
>>
>> second question: users will keep volumes mounted...is there a way to
>> keep the script from searching anything that's not a local disk?
>>
>> ====here's the terminal display====
>>
>> [montalvdpb:~] root # find / -name "AdobeFnt*.lst" -exec rm -f {} ';'
>> find: /Volumes/SHARE/.Trashes: Permission denied
>> find: /Volumes/SHARE/dropboxes: Permission denied
>> find: /Volumes/SHARE/Temporary Items/0: Permission denied
>> find: /Volumes/SHARE/Temporary Items/501: Permission denied
>> find: /Volumes/SHARE/Temporary Items/502: Permission denied
>> [montalvdpb:~] root #
>>
>> ===================================
>>
>> thanks!
>> don
More information about the X-Unix
mailing list