Re: java process not executing command
Re: java process not executing command
- Subject: Re: java process not executing command
- From: Sacha Mallais <email@hidden>
- Date: Wed, 28 Sep 2005 09:29:23 -0700
On Sep 28, 2005, at 8:19 AM, Wolfram Stebel wrote:
hi all,
i have an app running, which listens on apache logs via "tail -f -n 0
path/filename".
works fine.
Now i want to execute "ls -lat /var/log/httpd/access_log*".
from the error stream i get "ls: /var/log/httpd/access_log*: No
such file or
directory".
Wy does it execute the tail but not the ls?
I think the problem is that you don't get shell globbing with
Runtime.exec(), which means that it will look for a file called
exactly "access_log*". You'll need to provide the exact name in your
ls command, or, it -might- work by executing your command in a shell,
as in
sh -c ls -lat /var/log/httpd/access_log*
sacha
--
Sacha Michel Mallais Senior Developer / President
Global Village Consulting Inc. http://www.global-village.net/
PGP Key ID: 7D757B65 AIM: smallais
ObAd: read "Practical WebObjects" <fnord>
http://www.global-village.net/products/practical_webobjects
Attachment:
PGP.sig
Description: This is a digitally signed message part
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden