1 // written in the D programming language
2
3 module dihelp;
4
5 import std.stdio;
6 import config;
7 import dilocale;
8
9 void
dispVersion()10 dispVersion ()
11 {
12 writefln (DI_GT("di version %s Default Format: %s"), DI_VERSION, DI_DEFAULT_FORMAT);
13 }
14
15 void
usage()16 usage ()
17 {
18 dispVersion ();
19 /* 12345678901234567890123456789012345678901234567890123456789012345678901234567890 */
20 writeln (DI_GT("Usage: di [-ant] [-d display-size] [-f format] [-x exclude-fstyp-list]"));
21 writeln (DI_GT(" [-I include-fstyp-list] [file [...]]"));
22 writeln (DI_GT(" -a : print all mounted devices"));
23 writeln (DI_GT(" -d x : size to print blocks in (512 - POSIX, k - kbytes,"));
24 writeln (DI_GT(" m - megabytes, g - gigabytes, t - terabytes, h - human readable)."));
25 writeln (DI_GT(" -f x : use format string <x>"));
26 writeln (DI_GT(" -I x : include only file system types in <x>"));
27 writeln (DI_GT(" -x x : exclude file system types in <x>"));
28 writeln (DI_GT(" -l : display local filesystems only"));
29 writeln (DI_GT(" -n : don't print header"));
30 writeln (DI_GT(" -t : print totals"));
31 writeln (DI_GT(" Format string values:"));
32 writeln (DI_GT(" m - mount point M - mount point, full length"));
33 writeln (DI_GT(" b - total kbytes B - kbytes available for use"));
34 writeln (DI_GT(" u - used kbytes c - calculated kbytes in use"));
35 writeln (DI_GT(" f - kbytes free v - kbytes available"));
36 writeln (DI_GT(" p - percentage not avail. for use 1 - percentage used"));
37 writeln (DI_GT(" 2 - percentage of user-available space in use."));
38 writeln (DI_GT(" i - total file slots (i-nodes) U - used file slots"));
39 writeln (DI_GT(" F - free file slots P - percentage file slots used"));
40 writeln (DI_GT(" s - filesystem name S - filesystem name, full length"));
41 writeln (DI_GT(" t - disk partition type T - partition type, full length"));
42 writeln (DI_GT("See manual page for more options."));
43 }
44