Usando iwatch
iwatch
o_O é um programa de monitoramento de sistema de arquivos em tempo real usando inotify
e um serviço de correio local em funcionamento
Para uma melhor obscuridade, você deve alterar o endereço de e-mail e iniciar o deamon como root ou outra coisa… :)
sudo apt-get install iwatch
-
Crie um arquivo de configuração com o nome
iwatch.xml
<?xml version="1.0" ?> <!DOCTYPE config SYSTEM "/etc/iwatch/iwatch.dtd" > <config> <guard email="username@localhost" name="iWatch"/> <watchlist> <title>a title</title> <contactpoint email="username@localhost" name="foo bar"/> <path type="recursive" events="default">/home/username</path> </watchlist> </config>
-
Iniciar o deamon
iwatch -d -f iwatch.xml -p ~/iwatch.pid
-d
Executa o aplicativo como daemon. O iWatch será executado em foregroud sem essa opção.-f
Especifica o arquivo de configuração alternativo. O padrão é/etc/iwatch/iwatch.xml
-p
Especifique um arquivo pid alternativo. Padrão:/var/run/iwatch.pid
-
Verifique seus e-mails locais ;)
Some interesting events
-e event [,event[,..]]
Specify a list of events you want to watch. Following are the possible events you
can use:
access : file was modified
modify : file was modified
attrib : file attributes changed
close_write : file closed, after being opened in writeable mode
close_nowrite : file closed, after being opened in read-only mode
close : file closed, regardless of read/write mode
open : file was opened
moved_from : File was moved away from.
moved_to : File was moved to.
move : a file/dir within watched directory was moved
create : a file was created within watched director
delete : a file was deleted within watched directory
delete_self : the watched file was deleted
unmount : file system on which watched file exists was unmounted
q_overflow : Event queued overflowed
ignored : File was ignored
isdir : event occurred against dir
oneshot : only send event once
all_events : All events
default : close_write, create, delete, move, delete_self and move_self.
Mais informações aqui