Cron and find

will.wright@tiscali.co.uk will.wright@tiscali.co.uk
Tue Nov 14 10:42:00 GMT 2006


Hi,

I have a problem getting a find command which works fine on the command line
to work when run via cron.

The command is:

4 10 * * 1-5 find /cygdrive/d/Apps_v8p4//Bridge/DataFeed/deploy//quotefeed/logs
-type f -name stdout.log\.* -mtime +2 > /cygdrive/d/Apps_v8p4/Bridge/DataFeed/deploy/bin/testfind.log

This produces an empty "testfind.log" file but when run from the command
line I get:

$ find /cygdrive/d/Apps_v8p4//Bridge/DataFeed/deploy//quotefeed/logs -type
f -n
ame stdout.log\.* -mtime +2
/cygdrive/d/Apps_v8p4//Bridge/DataFeed/deploy//quotefeed/logs/stdout.log.03Nov20
06
/cygdrive/d/Apps_v8p4//Bridge/DataFeed/deploy//quotefeed/logs/stdout.log.06Nov20
06
/cygdrive/d/Apps_v8p4//Bridge/DataFeed/deploy//quotefeed/logs/stdout.log.07Nov20
06
/cygdrive/d/Apps_v8p4//Bridge/DataFeed/deploy//quotefeed/logs/stdout.log.08Nov20
06
/cygdrive/d/Apps_v8p4//Bridge/DataFeed/deploy//quotefeed/logs/stdout.log.09Nov20
06
/cygdrive/d/Apps_v8p4//Bridge/DataFeed/deploy//quotefeed/logs/stdout.log.10Nov20
06

...as expected.

I have read the thread http://www.cygwin.com/ml/cygwin/2005-12/msg00905.html
and scaned google, mailing lists etc but don't see anything of use.

I also tried making sure the user can see the directory from cron by making
a more simple "ls" job...

14 10 * * 1-5 ls /cygdrive/d/Apps_v8p4//Bridge/DataFeed/deploy//quotefeed/logs
> /cygdrive/d/Apps_v8p4/Bridge/DataFeed/deploy/bin/lstestfind.log

This produces the expected list in the output file:

quotefeed.log
quotefeed.log.1
quotefeed.log.10
quotefeed.log.11
quotefeed.log.12
quotefeed.log.13
quotefeed.log.14
quotefeed.log.15
quotefeed.log.16
quotefeed.log.17
quotefeed.log.18
quotefeed.log.19
quotefeed.log.2
quotefeed.log.20
quotefeed.log.3
quotefeed.log.4
quotefeed.log.5
quotefeed.log.6
quotefeed.log.7
quotefeed.log.8
quotefeed.log.9
stdout.log
stdout.log.03Nov2006
stdout.log.06Nov2006
stdout.log.07Nov2006
stdout.log.08Nov2006
stdout.log.09Nov2006
stdout.log.10Nov2006
stdout.log.13Nov2006
stdout.log.14Nov2006

So - it seems it can see the directory, but for some reason the find command
isn't happy... any ideas?

Have attached the cygcheck file as suggested.

Thanks for any help

Will



___________________________________________________________

Tiscali Unlimited Broadband with FREE weekend calls only 12.99!
http://www.tiscali.co.uk/products/broadband/



-------------- next part --------------
A non-text attachment was scrubbed...
Name: cygcheck.out
Type: application/octet-stream
Size: 14296 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20061114/51f68bb4/attachment.obj>
-------------- next part --------------
--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


More information about the Cygwin mailing list