X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=guestfish-actions.pod;h=9f625c71abdfe9ebb5c613ff29e7c0b61dbac5bc;hp=9b07c402cb16a5dbe1376f4ee17746567959f169;hb=e492608f2f3809a824cb70ee03ff305964b69dd7;hpb=d1a1ab972bb22f4c38a21fcc73f81650aaa03b4e diff --git a/guestfish-actions.pod b/guestfish-actions.pod index 9b07c40..9f625c7 100644 --- a/guestfish-actions.pod +++ b/guestfish-actions.pod @@ -26,7 +26,7 @@ for whatever operations you want to perform (ie. read access if you just want to read the image or write access if you want to modify the image). -This is equivalent to the qemu parameter C<-drive file=filename>. +This is equivalent to the qemu parameter C<-drive file=filename,cache=off>. Note that this call checks for the existence of C. This stops you from specifying other types of drive which are supported @@ -401,7 +401,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). The return value is anything printed to I by the command. @@ -432,6 +434,8 @@ FTP. This is the same as C, but splits the result into a list of lines. +See also: C + Because of the message protocol, there is a transfer limit of somewhere between 2MB and 4MB. To transfer large files you should use FTP. @@ -475,6 +479,27 @@ There is no comprehensive help for this command. You have to look at the file C in the libguestfs source to find out what you can do. +=head2 df + + df + +This command runs the C command to report disk space used. + +This command is mostly useful for interactive sessions. It +is I intended that you try to parse the output string. +Use C from programs. + +=head2 df-h + + df-h + +This command runs the C command to report disk space used +in human-readable format. + +This command is mostly useful for interactive sessions. It +is I intended that you try to parse the output string. +Use C from programs. + =head2 dmesg dmesg @@ -515,6 +540,20 @@ Setting C to 3 should drop everything. This automatically calls L before the operation, so that the maximum guest memory is freed. +=head2 du + + du path + +This command runs the C command to estimate file space +usage for C. + +C can be a file or a directory. If C is a directory +then the estimate includes the contents of the directory and all +subdirectories (recursively). + +The result is the estimated size in I +(ie. units of 1024 bytes). + =head2 e2fsck-f e2fsck-f device @@ -679,6 +718,21 @@ For more information on states, see L. This returns the verbose messages flag. +=head2 glob-expand + + glob-expand pattern + +This command searches for all the pathnames matching +C according to the wildcard expansion rules +used by the shell. + +If no paths match, then this returns an empty list +(note: not an error). + +It is just a wrapper around the C L function +with flags C. +See that manual page for more details. + =head2 grub-install grub-install root device @@ -686,6 +740,33 @@ This returns the verbose messages flag. This command installs GRUB (the Grand Unified Bootloader) on C, with the root directory being C. +=head2 head + + head path + +This command returns up to the first 10 lines of a file as +a list of strings. + +Because of the message protocol, there is a transfer limit +of somewhere between 2MB and 4MB. To transfer large files you should use +FTP. + +=head2 head-n + + head-n nrlines path + +If the parameter C is a positive number, this returns the first +C lines of the file C. + +If the parameter C is a negative number, this returns lines +from the file C, excluding the last C lines. + +If the parameter C is zero, this returns an empty list. + +Because of the message protocol, there is a transfer limit +of somewhere between 2MB and 4MB. To transfer large files you should use +FTP. + =head2 hexdump hexdump path @@ -888,6 +969,29 @@ Create a directory named C. Create a directory named C, creating any parent directories as necessary. This is like the C shell command. +=head2 mkdtemp + + mkdtemp template + +This command creates a temporary directory. The +C