X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=guestfish-actions.pod;h=d45c0015ff9e7d705ff2dd5bb2f306d271765dad;hp=e21dc7b728b22d9dc25d5832155a19f750b0f064;hb=826020fe18bf2eee43f8afea392874bb88c0650a;hpb=da947eadcfa1367c2d634667068db813a87a6dd1 diff --git a/guestfish-actions.pod b/guestfish-actions.pod index e21dc7b..d45c001 100644 --- a/guestfish-actions.pod +++ b/guestfish-actions.pod @@ -705,6 +705,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 @@ -1266,7 +1293,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 +1422,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 +1604,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