Re: korn shell script

From: Shawn Bierman (BiermanS@METHODISTHEALTH.ORG)
Date: Thu Sep 12 2002 - 16:13:45 EDT


find /dir -name filename -size +100 | xargs rm -r

This will look in /dir for a file called filename and if it is larger than 50k in size it will be deleted.

Please test it without the 'rm -r' option on your own. try this:

find /dir -name filename -size +100 | xargs ls

-shawn

>>> VipinK@NEOSUSA.COM 9/12/02 11:52:10 AM >>>
Greetings:

I would like to have cron execute a script that examines a file located
at say /xx/yy and if the file is at or below a certain size threshold
then delete it.

How would I do this?

TIA

Vipin Khushu
781-794 8800 x244



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 22:16:12 EDT