Newsgroups: alt.sources.d Path: utzoo!telly!robohack!druid!darcy From: darcy@druid.uucp (D'Arcy J.M. Cain) Subject: Re: TIMESTAMP: a useful file filter by last modified time Reply-To: darcy@druid.UUCP (D'Arcy J.M. Cain) Organization: D'Arcy Cain Consulting, West Hill, Ontario Date: Mon, 2 Jul 90 19:24:29 GMT Message-ID: <1990Jul2.192429.16163@druid.uucp> References: <926@limbo.Intuitive.Com> <4160@taux01.nsc.com> In various articles discussing TIMESTAMP > [...] I needed something to operate on files based on the time stamp with better granularity than find as well. My approach was to write a program which simply lists the files on the command line with their age in seconds. I can then use standard shell tools to manipulate them. For example, the following code lets me delay batching ihave/sendme in C News by 24 hours: if [ -r $NEWSARTS/holding/* ] then for i in `age $NEWSARTS/holding/* | awk '{if ($2 >86400) print $1}'` do cat $i | rnews && rm -f $i done fi I never posted the code because it is so trivial but if any one wants it let me know. I will email or post depending on the response. -- D'Arcy J.M. Cain (darcy@druid) | Government: D'Arcy Cain Consulting | Organized crime with an attitude West Hill, Ontario, Canada | (416) 281-6094 |