Shell Script to track File Changes

Write a shell script to save the output of 'ls -ltr' every five minutes and after every hour it should print which all files are changed/modified/created.

Questions by iblue

Showing Answers 1 - 7 of 7 Answers

swetha_0505

  • Oct 26th, 2009
 

find . -mtime 0   # find files modified between now and 1 day ago (i.e., within the past 24 hours)

find . -mtime -1  # find files modified less than 1 day ago (i.e., within the past 24 hours, as before)

find . -mtime 1    # find files modified between 24 and 48 hours ago

find . -mtime +1  # find files modified more than 48 hours ago

find . -mmin +5 -mmin -10 # find files modified between 6 and 9 minutes ago

                                            

Give your answer:

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

 

Related Answered Questions

 

Related Open Questions