使用cygwin win7上的logrotate

我使用着名的Windows 7和Cygwin的logrotate,我有最新的cygwin DLL,但不知何故应用程序不工作,configuration文件似乎是好的。 有没有人遇到过这个? 我的configuration文件是这样的

nocreate /cygdrive/c/log/*.log { daily rotate 14 nocompress nocopytruncate } 

和控制台给我一个意想不到的文本错误,也说,指定的目录无法find。

编辑:

  error: logrotate.conf:1 unexpected text error: logrotate.conf:2 lines must begin with a keyword or a filename (possibly in double quotes) error: logrotate.conf:3 unexpected text error: logrotate.conf:4 unexpected text error: logrotate.conf:5 unexpected text error: logrotate.conf:6 unexpected text error: logrotate.conf:7 lines must begin with a keyword or a filename (possibly in double quotes) error: logrotate.conf:8 lines must begin with a keyword or a filename (possibly in double quotes) error: stat of /cygdrive/C/log/*.log failed: No such file or directory 

这些是我运行应用程序后从控制台得到的错误。 一切权限都可以。

意外的文本可能意味着你在logrotate.conf中有dos风格的行结尾:尝试运行dos2unix logrotate.conf

然后是这一行:错误:/cygdrive/C/log/*.log stat失败:没有这样的文件或目录

  1. 该目录是否存在?
  2. 有没有* .log文件在里面?
  3. *正确扩展?
  4. 有没有由Windows 7 UAC不被Cygwin处理引起的权限问题?

尝试指定,比如/tmp/testlogdir/testlog.log(实际上创build该文件!)