diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2009-06-29 12:25:31 +0100 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2009-06-29 12:25:31 +0100 |
commit | 405cf2a5772611ea05cca9fefa843154a9bc64a3 (patch) | |
tree | 8d0d1f4e3c7fa161ca9f26b04705586cf03c9f62 /src | |
parent | 8f382fd9e7b1745a4b1d6f25f0a775bed2573b8e (diff) | |
download | libguestfs-405cf2a5772611ea05cca9fefa843154a9bc64a3.tar.gz libguestfs-405cf2a5772611ea05cca9fefa843154a9bc64a3.tar.xz libguestfs-405cf2a5772611ea05cca9fefa843154a9bc64a3.zip |
Add 'df' and 'df-h' commands.
df and df-h commands can be used interactively to show disk
space usage.
Use existing statvfs command from programs.
Diffstat (limited to 'src')
-rwxr-xr-x | src/generator.ml | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/generator.ml b/src/generator.ml index abc73da0..85e5c02f 100755 --- a/src/generator.ml +++ b/src/generator.ml @@ -2558,6 +2558,31 @@ from the file C<path>, starting with the C<-nrlines>th line. If the parameter C<nrlines> is zero, this returns an empty list."); + ("df", (RString "output", []), 125, [], + [], (* XXX Tricky to test because it depends on the exact format + * of the 'df' command and other imponderables. + *) + "report file system disk space usage", + "\ +This command runs the C<df> command to report disk space used. + +This command is mostly useful for interactive sessions. It +is I<not> intended that you try to parse the output string. +Use C<statvfs> from programs."); + + ("df_h", (RString "output", []), 126, [], + [], (* XXX Tricky to test because it depends on the exact format + * of the 'df' command and other imponderables. + *) + "report file system disk space usage (human readable)", + "\ +This command runs the C<df -h> command to report disk space used +in human-readable format. + +This command is mostly useful for interactive sessions. It +is I<not> intended that you try to parse the output string. +Use C<statvfs> from programs."); + ] let all_functions = non_daemon_functions @ daemon_functions |