• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: java process not executing command
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >java process not executing command (From: Wolfram Stebel <email@hidden>)

  • Prev by Date: Suggestions for secure web services direction?
  • Next by Date: WOCookie value() returns quoted/parenthesized string not string
  • Previous by thread: java process not executing command
  • Next by thread: Suggestions for secure web services direction?
  • Index(es):
    • Date
    • Thread