Friday, May 8, 2015

Find changed files on the system



The command below List all files along with md5 information from your system.
# find / -type f | xargs md5sum > All_Files-`date +%m%d%y`

Note: May take long time to complete.

The command below List all files along with md5 information that are changed within last 5 minutes.
# find / -type f -mmin -5 | xargs md5sum > Changed_Files-`date +%m%d%y`

To find the difference between old record and new one, run the diff command

# diff All_Files Changed_Files


You can script the task as follow
# for((i=1;i<=16;i++)) do find ~/ -type f > new;diff original new; done



No comments:

Post a Comment