TIMESTAMP: a useful file filter by last modified time
D'Arcy J.M. Cain
darcy at druid.uucp
Tue Jul 3 05:24:29 AEST 1990
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 at druid) | Government:
D'Arcy Cain Consulting | Organized crime with an attitude
West Hill, Ontario, Canada |
(416) 281-6094 |
More information about the Alt.sources.d
mailing list