Posted on September 15th, 2014
- crontab -l : list user's crontab
[Reference]
Posted on August 28th, 2014
[Reference]
iWatch 0.2.2, a realtime filesystem monitor.
Cahya Wirawan
, Vienna 2006.
In the daemon mode, iWatch has following options:
Usage: iwatch [-d] [-f ] [-v] [-p ]
-d Execute the application as daemon.
-f
Specify an alternate xml configuration file.
-p
Specify an alternate pid file (default: /var/run/iwatch.pid)
-v Verbose mode.
And in the command line mode:
Usage: iwatch [-c command] [-C charset] [-e event[,event[,..]]] [-h|--help] [-m ]
[-r] [-s ] [-t ] [-v] [--version] [-x exception]
[-X ]
Target is the directory or file you want to monitor.
-c command
Specify a command to be executed if an event occurs. And you can use
following special string format in the command:
%c Event cookie number
%e Event name
%f Full path of the filename that gets an event.
%F The old filename in case moved_to event.
%p Program name (iWatch)
%v Version number
-C charset
Specify the charset (default is utf-8)
-e event[,event[,..]]
Specify a list of events you want to watch. Following are the possible events you can use:
access : file was accessed
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 directory
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.
-h, --help
Print this help.
-m
Specify the contact point's email address.
-r Recursivity of the watched directory.
-s
Enable or disable reports to the syslog (default is off/disabled)
-t
Specify a filter string (regex) to compare with the filename or directory name.
-v verbose mode.
--version
Print the version number.
-x exception
Specify the file or directory which should not be watched.
-X
Specify a regex string as exception
[Usage]
- root@a40jr:/mnt/sda/Temp/git/iwatch# iwatch -c "ls -l %f" -r /mnt/sda/Temp/git/iwatch &
[5] 8935
[4] Killed iwatch -c ls -r /mnt/sda/Temp/git/iwatch
root@a40jr:/mnt/sda/Temp/git/iwatch# [28/ 8月/2014 13:52:27] IN_CREATE /mnt/sda/Temp/git/iwatch/subdir/2.txt
[28/ 8月/2014 13:52:27] * Command: ls -l /mnt/sda/Temp/git/iwatch/subdir/2.txt
-rw-r--r-- 1 root root 0 8月 28 13:52 /mnt/sda/Temp/git/iwatch/subdir/2.txt
- Since the .git folder issue, use the iwatch to monitor the new branch/tag.
iwatch -r -c "chmod -R 777 %f" -e create $sDir/$f" - http://manpages.ubuntu.com/manpages/hardy/man1/iwatch.1.html
Posted on August 28th, 2014
[Ubuntu 11.04]
- service restart : sudo service ssh restart
Posted on February 21st, 2014
Posted on February 9th, 2014