Quote:
Originally posted by mccrack_2003
Thanx for the nfo Damian. Problem is that find is gonna pull all files updated within last 24 hours. I need too somehow get 01-03-2003 too 28-02-2003 . So there is going too have too be some form of intelligence in it.
|
You could use find with the -newer flag
First create a file with a timestamp to use as the cutoff point...
touch -t 200309181230.00 timeCutOffFile
find timeCutOffFile -newer yourLogFile
The above would return "timeCutOffFile" if it is newer than yourLogFile, hence...
if ! test -z "$(find timeCutOffFile -newer yourLogFile)"
then
# if the result of the find is not empty, yourLogFile must be older
doStuffWithYourLogFile
fi
You can stick some more logic round that and you should have what you want.
HTH