What command can I use to compare files? find? grep? or rather, a comparison of the cast, they say, made a cast of the form:

filename, size, date

and then compare the new, current state, so that it is recorded. The purpose of all this is to identify new files, as well as those that have been changed.

if you offer an option easier or give direction in which to dig will be cool)

    4 answers 4

    There are lots of options. Here first came to mind:

    find /tmp/ -type f -exec md5sum {} \; > /home/user/tmp.md5 echo "123" > /tmp/newfile find /tmp/ -type f -exec md5sum {} \; > /home/user/tmp.md5.new cat /home/user/tmp.md5.new /home/user/tmp.md5 | sort | uniq -u d41d8cd98f00b204e9800998ecf8427e /tmp/newfile 

    This is a vskidku. And so you can at least compare the color :)

    If a

     цель всего этого - выявить новые файлы, а также те которые были изменены. 

    that is

     find . -mtime 1 

    will show all files / folders modified during the last 24 hours, in man find all the details.

    • and if the file has a date replaced, it will not see such a file, how to see it? - armenka
    • What does "replaced" mean? This is real? I mean in this situation. - ArcherGodson September
    • Yes, the goal of all this is to burn viruses. for example, I have had cases of automaton breaking websites on WordPress and files created back in 2011 were sitting. although the logs were broken in July. - armenka

    diff if you need to find discrepancies in approximately identical files.

      rkhunter to help you.

      • This is if you need to find viruses. - Izya12