[jboss-as7-dev] Moving through the Filesystem with CLI
Alexey Loubyansky
alexey.loubyansky at redhat.com
Wed Jul 20 09:12:49 EDT 2011
That's tricky. E.g. ps, cd and vi can all be entered on a command line
but from java they have to be executed differently.
// system command
String[] cmd = {"ps"};
Runtime.getRuntime().exec(cmd);
//shell command
String[] cmd = {"/bin/sh", "-c", "cd mydir"};
// of course it'll affect only the launched shell
Runtime.getRuntime().exec(cmd);
And vi is a terminal application which is even trickier.
On 07/20/2011 02:17 PM, Francesco Marchioni wrote:
> Well, actually they are a bit different as the command line navigates
> through a virtual subsystems path, while an operating system cd/lcd
> would traverse a physical path. However, what about a "!" switch to
> execute OS command, like for the vi editor ?
> kind regards
> Francesco
>
> 2011/7/20 Darran Lofthouse <darran.lofthouse at jboss.com
> <mailto:darran.lofthouse at jboss.com>>
>
> I am wondering if this request is similar to command line ftp where you
> can navigate both the remote server with cd and locally with lcd.
>
> Regards,
> Darran Lofthouse.
>
>
> On 07/20/2011 10:45 AM, Vimal Kansal wrote:
> > I think basically what you are asking is the ability to enter the OS
> > shell and execute OS commands which I think right now is not
> supported
> > by CLI. I think this will be a good feature.
> >
> > On 20/07/2011 6:55 PM, Mylos wrote:
> >> Hello!
> >> does anyone know if it's possible to navigate through the Filesystem
> >> when using the CLI ? that would be very useful for deployments.(If I
> >> understand correclty the 'cd' command moves through the tree of AS
> >> resources...)
> >> Thank you very much
> >> Mylos
> >>
> >
> > _______________________________________________
> > jboss-as7-dev mailing list
> > jboss-as7-dev at lists.jboss.org <mailto:jboss-as7-dev at lists.jboss.org>
> > https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
> _______________________________________________
> jboss-as7-dev mailing list
> jboss-as7-dev at lists.jboss.org <mailto:jboss-as7-dev at lists.jboss.org>
> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
>
>
>
>
> _______________________________________________
> jboss-as7-dev mailing list
> jboss-as7-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
More information about the jboss-as7-dev
mailing list