4

Can anyone please suggest me some script or mechanism so that I can record all the Changes made into my GNU/Linux File System on daily basis.

Example:

Suppose I make the following changes on 1-Jan-2012:

File_Modified                Modification_type      Date/Timestamp

/mnt/linux_d/notes.txt       Added                  1-Jan-2012 10:00 AM

/root/Desktop/log/pdf        Deleted                1-Jan-2012 2:00 PM

/root/Document/sample.html   Modified               1-Jan-2012 5:00 PM

Thanks.

Best Regards,

Sandeep Singh

Sandeep Singh
  • 4,941
  • 8
  • 36
  • 56
  • Are you really sure you want to log all changes? It could make a huge logfile! – Basile Starynkevitch Jan 01 '12 at 07:36
  • Yes, I am looking for some command-line option (preferably) rather than going for a scanner. This will also enable me to run it on a particular directory rather than going for entire "/" partition. – Sandeep Singh Jan 01 '12 at 07:42

3 Answers3

6

Take a look at tripwire:

Tripwire is a tool that aids system administrators and users in monitoring a designated set of files for any changes. Used with system files on a regular (e.g., daily) basis, Tripwire can notify system administrators of corrupted or tampered files, so damage control measures can be taken in a timely manner.

There are packages available on many distributions.

Kevin
  • 6,665
  • 1
  • 17
  • 14
2

zfs file system supports similar functionality. And there are many more. See this wiki entry. http://en.wikipedia.org/wiki/Versioning_file_system

Shiplu Mokaddim
  • 56,364
  • 17
  • 141
  • 187
2

If you care only about changes inside one single directory, you could use the inotify facilities, in particular inotifywatch.

You can also use incrond thru incrontab

Basile Starynkevitch
  • 223,805
  • 18
  • 296
  • 547