From 405cf2a5772611ea05cca9fefa843154a9bc64a3 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 29 Jun 2009 12:25:31 +0100 Subject: 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. --- src/generator.ml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'src') 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, starting with the C<-nrlines>th line. If the parameter C 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 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."); + + ("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 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."); + ] let all_functions = non_daemon_functions @ daemon_functions -- cgit