Philip S Tellis [linux-list] <26/11/02 10:37 +0530>:
> On Tue, 26 Nov 2002, mukund wrote:
> 
> > I need to delete files based on size and extension and that to
> > recursively (in sub directories also) How to do it using shell
> 
> man find.  man xargs.  man rm.

from the find man page, under actions, it is stated that a command can
be executed with  "-exec command" followed by the string `{}' which
expands to the files found with the find command.

could this same functionality be achived if i use:
rm `find /home/mario/.ask/queue -ctime +10`

i want to delete all files in my ~/.ask/queue folder which if older
than 10 days are most likely to be spam.

to delete files older than 10 days ? this works on the command prompt,
but i want to add this to be run by cron. i've just made my 2nd
/var/spool/cron/mario entry. the first was a touch command just to be
sure that i wasn't screwing up the crontab syntax. the 2nd is the "rm"
line that i've indicated above.

would this work in my crontab or do i need to add something like:
30 10 * * * find /home/mario/.ask/queue -exec rm `{}';\

Thank You,
Regards,
mario

p.s. ASK - active spam killer
www.paganini.net/ask
-- 
     The opinions expressed in this mail are mine and may not reflect
          those of my employer


-------------------------------------------------------
This SF.net email is sponsored by: Get the new Palm Tungsten T 
handheld. Power & Color in a compact size! 
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en
_______________________________________________
linux-india-help mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/linux-india-help

Reply via email to