[Ilugc] HOW TO KEEP A LOG OF DELETED FILES ?
roshan at arjie.com
Thu Feb 11 13:50:55 IST 2010
On Thu, 2010-02-11 at 06:51 +0000, swapan karmakar wrote:
> IS IT POSSIBLE TO MAINTAIN A LOG OF FILES DELETED , IN LINUX ?
Dude, I think your Caps Lock key is stuck. Anyway, you can write
something using inotify to do what you want. If you're feeling lazy and
have some idea of what files you want to watch then use inotifywait from
inotifytools. Put it in a shell script and enjoy.
Here's an example of how inotify works
$ touch cow
$ inotifywait -m cow
Setting up watches.
That happens when I ran the following in another pty:
$ mv cow pig
$ rm pig
You can make it do all sorts of more complicated things if you want to.
Roshan George <roshan at arjie.com>
More information about the ilugc