Chinaunix首页 | 论坛 | 博客
  • 博客访问: 28752
  • 博文数量: 13
  • 博客积分: 25
  • 博客等级: 民兵
  • 技术积分: 75
  • 用 户 组: 普通用户
  • 注册时间: 2012-03-12 20:16
文章分类
文章存档

2012年(13)

我的朋友
最近访客

分类:

2012-04-26 08:23:38

dnotifyLinux的文件夹监控

 

Ubuntu下面监控文件夹可以使用命令dnotify

安装:apt-get install dnotify

 

Usage: dnotify [OPTION]... DIRECTORY... [-e COMMAND...]

Execute a command every time the contents of a directory change.

 

Events:

  -A, --access             trigger when a file in the directory was accessed

  -M, --modify             trigger when a file in the directory was modified

  -C, --create             trigger when a file was created in the directory

  -D, --delete             trigger whan a file was unlinked from the directory

  -R, --rename             trigger when a file in the directory was renamed

  -B, --attrib             trigger when the directory had its attributes

                           changed (after chmod, chown)

  -a, --all                all of the above

 

General:

  -e, --execute=COMMAND..  command to execute when an event is triggered

                           (all remaining args are treated as command args)

  -f, --file=FILE          read directories to monitor from FILE, one per line

  -p, --processes=COUNT    max number of commands to run at a time

  -q, --queue=DEPTH        max depth of queue holding commands to be run

  -t, --times=COUNT        exit after running the command COUNT times

  -o, --once               same as `--times 1'

  -r, --recursive          monitor subdirectories too (recursively)

  -b, --background         run in background (detach)

  -s, --silent             don't print warnings about non-zero child exits

      --quiet              same as `--silent'

      --help               display this help and exit

      --version            output version information and exit

 

Unless events have been specified, the events are set to create and delete.

 

Specifying -1 for queue means unlimited depth. The default value for --queue

is -1, and 1 for --processes.

 

The default command (unless specified with -e) is to print the name of the

of the directory updated. The string `{}' in the command specification is

replaced by the name of the directory that was updated.

 

Report bugs to .

阅读(793) | 评论(0) | 转发(0) |
0

上一篇:安装Windows+Linux双系统

下一篇:没有了

给主人留下些什么吧!~~