X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=guestfish-actions.pod;h=a3592ad40240cc997acb1ff49b3d05a8f82ad026;hb=1799b5ce4741446704418fe06ea7e13a91028b7e;hp=e21dc7b728b22d9dc25d5832155a19f750b0f064;hpb=da947eadcfa1367c2d634667068db813a87a6dd1;p=libguestfs.git diff --git a/guestfish-actions.pod b/guestfish-actions.pod index e21dc7b..a3592ad 100644 --- a/guestfish-actions.pod +++ b/guestfish-actions.pod @@ -479,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 @@ -519,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 @@ -705,6 +740,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 +778,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 @@ -959,6 +1035,14 @@ on the underlying device. The filesystem options C and C are set with this call, in order to improve reliability. +=head2 mount-loop + + mount-loop file mountpoint + +This command lets you mount C (a filesystem image +in a file) on a mount point. It is entirely equivalent to +the command C. + =head2 mount-options mount-options options device mountpoint @@ -1266,7 +1350,7 @@ can easily destroy all your data>. =head2 sfdisk-N - sfdisk-N device n cyls heads sectors line + sfdisk-N device partnum cyls heads sectors line This runs L option to modify just the single partition C (note: C counts from 1). @@ -1395,6 +1479,33 @@ underlying disk image. You should always call this if you have modified a disk image, before closing the handle. +=head2 tail + + tail path + +This command returns up to the last 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 tail-n + + tail-n nrlines path + +If the parameter C is a positive number, this returns the last +C lines of the file C. + +If the parameter C is a negative number, this returns lines +from the file C, starting with the C<-nrlines>th line. + +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 tar-in tar-in (tarfile|-) directory @@ -1550,6 +1661,27 @@ See also C. List all the volumes groups detected. This is the equivalent of the L command. The "full" version includes all fields. +=head2 wc-c + + wc-c path + +This command counts the characters in a file, using the +C external command. + +=head2 wc-l + + wc-l path + +This command counts the lines in a file, using the +C external command. + +=head2 wc-w + + wc-w path + +This command counts the words in a file, using the +C external command. + =head2 write-file write-file path content size