X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=guestfs-actions.pod;h=a48bbe68c6ee29a12d0b7eb3784b3bf96fa81e0e;hb=9a92446bcad09b492dee42dd5950bac67073fbea;hp=530a41301035a6981ec5450b40cca2f8cea1c099;hpb=f450ce75b754fb869b34433c0126f7bb592b141b;p=libguestfs.git diff --git a/guestfs-actions.pod b/guestfs-actions.pod index 530a413..a48bbe6 100644 --- a/guestfs-actions.pod +++ b/guestfs-actions.pod @@ -614,6 +614,33 @@ to find out what you can do. This function returns a string, or NULL on error. I. +=head2 guestfs_df + + char *guestfs_df (guestfs_h *handle); + +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. + +This function returns a string, or NULL on error. +I. + +=head2 guestfs_df_h + + char *guestfs_df_h (guestfs_h *handle); + +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. + +This function returns a string, or NULL on error. +I. + =head2 guestfs_dmesg char *guestfs_dmesg (guestfs_h *handle); @@ -915,6 +942,44 @@ C, with the root directory being C. This function returns 0 on success or -1 on error. +=head2 guestfs_head + + char **guestfs_head (guestfs_h *handle, + const char *path); + +This command returns up to the first 10 lines of a file as +a list of strings. + +This function returns a NULL-terminated array of strings +(like L), or NULL if there was an error. +I. + +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 guestfs_head_n + + char **guestfs_head_n (guestfs_h *handle, + int nrlines, + const char *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. + +This function returns a NULL-terminated array of strings +(like L), or NULL if there was an error. +I. + +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 guestfs_hexdump char *guestfs_hexdump (guestfs_h *handle, @@ -1689,7 +1754,7 @@ can easily destroy all your data>. int guestfs_sfdisk_N (guestfs_h *handle, const char *device, - int n, + int partnum, int cyls, int heads, int sectors, @@ -1873,6 +1938,44 @@ closing the handle. This function returns 0 on success or -1 on error. +=head2 guestfs_tail + + char **guestfs_tail (guestfs_h *handle, + const char *path); + +This command returns up to the last 10 lines of a file as +a list of strings. + +This function returns a NULL-terminated array of strings +(like L), or NULL if there was an error. +I. + +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 guestfs_tail_n + + char **guestfs_tail_n (guestfs_h *handle, + int nrlines, + const char *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. + +This function returns a NULL-terminated array of strings +(like L), or NULL if there was an error. +I. + +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 guestfs_tar_in int guestfs_tar_in (guestfs_h *handle,