![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Executing SQLPLUS in UNIX Script from JAVA | anooptech | UNIX for Advanced & Expert Users | 0 | 04-16-2008 05:53 AM |
| Executing a unix command | jacob23 | UNIX for Dummies Questions & Answers | 5 | 12-20-2006 07:36 PM |
| executing *.bat file on windows from Unix box via ftp command | alx | Shell Programming and Scripting | 9 | 01-29-2006 03:31 PM |
| executing the su command from a java program. | shailendrat | UNIX for Dummies Questions & Answers | 1 | 03-24-2005 09:27 AM |
| execute command unix with java:possible or not? | mips | Shell Programming and Scripting | 4 | 05-13-2004 04:07 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi - I am totally new to UNIX so please bear with me...
I run a java program on Win NT server to do file ftp to UNIX server. I log in, cd, create ftp file on UNIX and quit from my java progam - all works well. Now I want to execute a script on UNIX. At the UNIX 'console'/'shell' (!?) you type in: ./test for the script to execute. If I send the command "./test" from my java program, I get an error: "command not understood". I am in the correct directory where the "test" script is; and commands like "user xxxx" and "pass yyyy", and "cwd /home/mydir/" works fine. Any ideas? Tx, CJ |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
You have connected via the ftp protocol. You can do "get" or "put". But all you can do is move files around. You cannot run remote scripts via ftp.
You need to get your java program to connect via ssh or telnet to get a shell prompt. Then you can run "./test". And btw, "test" is not a great name. Unix has a "test" command. |
||||
| Google The UNIX and Linux Forums |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|