X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=guestfish-actions.pod;h=e727120f015e65977548ebbb500c17cbb27cfb1e;hp=d4f493016251fa2e7c0e70d2d1a9f604840dc8f6;hb=f20854ec61eef1aea313920f0cf193a78c1a9219;hpb=bcb3fc0c3336c05e9ecbbfb25c7c31b42bd3e32e diff --git a/guestfish-actions.pod b/guestfish-actions.pod index d4f4930..e727120 100644 --- a/guestfish-actions.pod +++ b/guestfish-actions.pod @@ -26,7 +26,8 @@ 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,cache=off>. +This is equivalent to the qemu parameter +C<-drive file=filename,cache=off,if=virtio>. Note that this call checks for the existence of C. This stops you from specifying other types of drive which are supported @@ -47,7 +48,7 @@ handle is closed. We don't currently have any method to enable changes to be committed, although qemu can support this. This is equivalent to the qemu parameter -C<-drive file=filename,snapshot=on>. +C<-drive file=filename,snapshot=on,if=virtio>. Note that this call checks for the existence of C. This stops you from specifying other types of drive which are supported @@ -479,6 +480,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 @@ -519,6 +541,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 @@ -650,6 +686,20 @@ C. This returns the ext2/3/4 filesystem UUID of the filesystem on C. +=head2 get-memsize + + get-memsize + +This gets the memory size in megabytes allocated to the +qemu subprocess. + +If C was not called +on this handle, and if C was not set, +then this returns the compiled-in default value for memsize. + +For more information on the architecture of libguestfs, +see L. + =head2 get-path get-path @@ -705,6 +755,33 @@ See that manual page for more details. 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 @@ -716,6 +793,20 @@ 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 initrd-list + + initrd-list path + +This command lists out files contained in an initrd. + +The files are listed without any initial C character. The +files are listed in the order they appear (not necessarily +alphabetical). Directory names are listed as separate items. + +Old Linux kernels (2.4 and earlier) used a compressed ext2 +filesystem as initrd. We I support the newer initramfs +format (compressed cpio files). + =head2 is-busy is-busy @@ -907,6 +998,37 @@ 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