How to find see the file which is created today,s date with time after 10 a.m to 5 p.m?

Showing Answers 1 - 2 of 2 Answers

Sharif

  • Nov 14th, 2006
 

Hi,

find . -atime 0 -type f -exec ls -ltr {} ;  | grep "`date +%b %d`"

    This command will show the files which are created today. But for ur second part of the quesiton i needto analyse more,

Explanation:

find . -atime 0 -type f -exec ls -ltr {}

   This will list the files where are accessed and created  today.

grep "`date +%b %d`"

    This part of the command will filter out unwanted files which were not created today.

Thanks!

Sharif.S

sharifhere@yahoo.com

Sharif

  • Nov 15th, 2006
 

set -u -a
rm -f out2
find $PWD -atime 0 -type f -exec ls -ltr {} ;  | grep "`date '+%b %d'`"  | tr -s " " | tr -d ":" > out2
echo "-------Files Modified Today--------"
cat out2 | while read line
do
   timechk=`echo  $line | cut -d " " -f8`
   filename=`echo $line | cut -d " " -f9`
   if [ $timechk -gt 1000 -a $timechk -lt 1700 ]
   then
      echo $filename
   fi
done
echo "-----------------------------------"

#Above Script will help you.

Thanks!

Sharif.S

   

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

Answer Question

Click here to Login / Register your free account


 
Send   Reset

 

Related Answered Questions

 

Related Open Questions