sh


Description:

[ Version ( since = "1.0.50" ) ]
public string sh (string command) throws Error

run a command via the shell

This call runs a command from the guest filesystem via the guest’s /bin/sh.

This is like command, but passes the command to:

<![CDATA[/bin/sh -c "command"]]>

Depending on the guest’s shell, this usually results in wildcards being expanded, shell expressions being interpolated and so on.

All the provisos about command apply to this call.

Parameters:

this

A GuestfsSession object

Returns:

the returned string, or NULL on error