Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
3.8k views
in Java FTP by (160 points)
we want to run the unix command top > filename on a remote unix server using edtftpj

we were not able to use the FTPClient.quote( String command, String[] responsecodes) because it does not 'recognize' the TOP command

how can I run this unix command TOP on the server?

can any one throw some light on this pleaz???

- Pavan.

3 Answers

0 votes
by (162k points)
It is very unlikely that you could do this using FTP unless the server is configured unusually.

You probably need to use rsh or ssh.

we want to run the unix command top > filename on a remote unix server using edtftpj

- Pavan.
0 votes
by (160 points)
thank u,

but there is a method quote() in FTPClient which allows us to fire unix commands. There is a method sendCommand() too in the class but it is 'protected'.

But the quote() method supports only some commands like pwd,cwd,stat etc... Donno why it doesn't support others like TOP which I am trying to use

Please do let me know if there is a way out,

Thanks for now,
Pavan.
0 votes
by (162k points)
quote is entirely dependent on what the server supports.

top isn't a standard Unix command (I think it is an installed utility) so I doubt if it is supported.

For security reasons most commands can't be run via quote.

thank u,

but there is a method quote() in FTPClient which allows us to fire unix commands. There is a method sendCommand() too in the class but it is 'protected'.

But the quote() method supports only some commands like pwd,cwd,stat etc... Donno why it doesn't support others like TOP which I am trying to use

Please do let me know if there is a way out,

Thanks for now,
Pavan.

Categories

...