You can use -mtime of find(1). -mtime -1 would list files newer than 24 hours. Alternatively, you can make a timestamp every midnight (from cron), and check with -nt, if your shell's test implementation has it. See man test for details. E.g.:
find /path/to/dir -mtime -1 > newFiles.lst
...
if grep -q $file newFiles.lst ; then
echo "file $file is new"
else
echo "old stuff"
fi
or
if [ $file -nt $timestamp ] ; then
echo "$file is new"
fi
Thanks for th eprompt reply..... i think this will defenitely help me... is -mtime -1 will get the files modified 1 day back right? is there any way to get files modified 30 mins ago...
Thanks a lot mirni..... find /mahe -mmin -30 | grep Data gives me name of the files greping Data. but i not ly need the name of file alone , i need the ouput like ls -l (ie) date time ,size,rwx acesss etc... Please help me..