-
Notifications
You must be signed in to change notification settings - Fork 0
WatchMe 使用
做梦专业户 edited this page Jan 31, 2020
·
1 revision
使用:
WatchMe - A util use to monitor the changes of directory
usage:
watchme [OPTION] [DIRECTOR]
-r : recurse monitor, means the all directory and file will be monitor
-d : the directory to monitor
--exclude-hidden : exclude the hidden directory
--help & -h : show help
例子:
java -jar Watcher.jar -r -d /tmp/Temp-69b5505c-88f5-4f2d-9af9-651e3aa65f20
输出:
Scanning /tmp/Temp-69b5505c-88f5-4f2d-9af9-651e3aa65f20 ...
Done.
{Event: [ADDED] /tmp/Temp-69b5505c-88f5-4f2d-9af9-651e3aa65f20/vim (File size=0)}
{Event: [MODIFIED] /tmp/Temp-69b5505c-88f5-4f2d-9af9-651e3aa65f20/vim (File size=0)}
监视失败或自动退出的情况:
- 当监视不具备读写(R/W)权限的目录文件或者特殊设备(/dev/,/proc/),WatchMe会自动退出。
- 当监视目录被删除或移动时,WatchMe会自动退出。