Series: Subject: Topic:
Question: 29 of 55

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

Asked by: Interview Candidate | Asked on: Nov 8th, 2006
Showing Answers 1 - 2 of 2 Answers

Answered On : 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!

Yes  1 User has rated as useful.
Login to rate this answer.

Answered On : Nov 15th, 2006

set -u -a rm -f out2find $PWD -atime 0 -type f -exec ls -ltr {} ;  | grep "`date '+%b %d'`"  | tr -s " " | tr -d ":" > out2echo "-------Files Modified Today--------"cat out2 | while read linedo   timechk=`echo  $line | cut -d " " -f8`   filename=`echo $line | cut -d " " -f9`   if [ $timechk -gt 1000 -a $timechk -lt 1700 ]   then      echo $filename   fidoneecho "-----------------------------------"#Above Script will help you. Thanks!Sharif.S   

Login to rate this answer.

Give your answer:

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

Related Open Questions



twitter fb Linkedin GPlus RSS


Interview Question

 Ask Interview Question?


Latest Questions

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.