summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorAndrei Mozzhuhin <nopscmn@gmail.com>2013-05-16 11:24:09 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2013-05-16 11:40:42 +0200
commit7bb71c7e9dd7a95953a8507cb49f4949a01ae2e4 (patch)
tree7adefcb855933c47a5ff00d73c67542d81c293c5 /doc
parentdosfs: Add statvfs() support (diff)
downloadrtems-7bb71c7e9dd7a95953a8507cb49f4949a01ae2e4.tar.bz2
shell: Add df command
Diffstat (limited to 'doc')
-rw-r--r--doc/shell/file.t78
1 files changed, 78 insertions, 0 deletions
diff --git a/doc/shell/file.t b/doc/shell/file.t
index c53a9cff3e..01a3b282b7 100644
--- a/doc/shell/file.t
+++ b/doc/shell/file.t
@@ -35,6 +35,7 @@ The RTEMS shell has the following file and directory commands:
@item @code{dir} - alias for ls
@item @code{mkrfs} - format RFS file system
@item @code{cd} - alias for chdir
+@item @code{df} - display file system disk space usage
@end itemize
@@ -2628,3 +2629,80 @@ following prototype:
extern rtems_shell_cmd_t rtems_shell_CD_Command;
@end example
+@c
+@c
+@c
+@page
+@subsection df - display file system disk space usage
+
+@pgindex df
+
+@subheading SYNOPSYS:
+
+@example
+df [-h] [-B block_size]
+@end example
+
+@subheading DESCRIPTION:
+
+This command print disk space usage for mounted file systems.
+
+@subheading EXIT STATUS:
+
+This command returns 0 on success and non-zero if an error is encountered.
+
+@subheading NOTES:
+
+NONE
+
+@subheading EXAMPLES:
+
+The following is an example of how to use @code{df}:
+
+@example
+SHLL [/] $ df -B 4K
+Filesystem 4K-blocks Used Available Use% Mounted on
+/dev/rda 124 1 124 0% /mnt/ramdisk
+SHLL [/] $ df
+Filesystem 1K-blocks Used Available Use% Mounted on
+/dev/rda 495 1 494 0% /mnt/ramdisk
+SHLL [/] $ df -h
+Filesystem Size Used Available Use% Mounted on
+/dev/rda 495K 1K 494K 0% /mnt/ramdisk
+@end example
+
+@subheading CONFIGURATION:
+
+@findex CONFIGURE_SHELL_NO_COMMAND_DF
+@findex CONFIGURE_SHELL_COMMAND_DF
+
+This command is included in the default shell command set.
+When building a custom command set, define
+@code{CONFIGURE_SHELL_COMMAND_DF} to have this
+command included.
+
+This command can be excluded from the shell command set by
+defining @code{CONFIGURE_SHELL_NO_COMMAND_DF} when all
+shell commands have been configured.
+
+@subheading PROGRAMMING INFORMATION:
+
+@findex rtems_shell_rtems_main_df
+
+The @code{df} is implemented by a C language function
+which has the following prototype:
+
+@example
+int rtems_shell_main_df(
+ int argc,
+ char **argv
+);
+@end example
+
+The configuration structure for the @code{df} has the
+following prototype:
+
+@example
+extern rtems_shell_cmd_t rtems_shell_DF_Command;
+@end example
+