X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;ds=sidebyside;f=perl%2Flib%2FSys%2FGuestfs.pm;h=9329b769a543b3979da7acc663f49de65ff1cad3;hb=4211c7a258debd236017a19c70965bc1b3658edb;hp=05adfcb470117b8f480889fdb746b8fe33b86b6b;hpb=460d139e6a52da67a4f1947035b1978610349f78;p=libguestfs.git diff --git a/perl/lib/Sys/Guestfs.pm b/perl/lib/Sys/Guestfs.pm index 05adfcb..9329b76 100644 --- a/perl/lib/Sys/Guestfs.pm +++ b/perl/lib/Sys/Guestfs.pm @@ -432,7 +432,9 @@ or compatible processor architecture). The single parameter is an argv-style list of arguments. The first element is the name of the program to run. Subsequent elements are parameters. The list must be -non-empty (ie. must contain a program name). +non-empty (ie. must contain a program name). Note that +the command runs directly, and is I invoked via +the shell (see C<$h-Esh>). The return value is anything printed to I by the command. @@ -461,6 +463,8 @@ FTP. This is the same as C<$h-Ecommand>, but splits the result into a list of lines. +See also: C<$h-Esh_lines> + Because of the message protocol, there is a transfer limit of somewhere between 2MB and 4MB. To transfer large files you should use FTP. @@ -1125,6 +1129,28 @@ This displays the partition table on C, in the human-readable output of the L command. It is not intended to be parsed. +=item $output = $h->sh ($command); + +This call runs a command from the guest filesystem via the +guest's C. + +This is like C<$h-Ecommand>, but passes the command to: + + /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 C<$h-Ecommand> apply to this call. + +=item @lines = $h->sh_lines ($command); + +This is the same as C<$h-Esh>, but splits the result +into a list of lines. + +See also: C<$h-Ecommand_lines> + =item $h->sleep ($secs); Sleep for C seconds.