0

Lets say i have an existing directory and someone did cp -r over this and some files changed. I want to detect this change. How can i do it ?

I thought of using md5 or some checksum calculator for directory but it could make my program slow since directory size can be way huge.

2
  • 1
    you can use a backup or rsync to compare in simulation mode of course it will be really faster that the md5 method Commented Jul 15, 2020 at 12:57
  • Please be more specific. Tell us what directory we're talking and if your goal is informative or tampering detection. Is it a personal or system directory? Debian holds e.g. package checksums at /var/lib/dpkg/info/*.md5sums (that can be edited by privileged users). For private data you may as well use git. Tampering detection is a whole other can of worms. Commented Jul 15, 2020 at 13:58

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.