summaryrefslogtreecommitdiff
path: root/doc/usage
diff options
context:
space:
mode:
Diffstat (limited to 'doc/usage')
-rw-r--r--doc/usage/cmd/cat.rst49
-rw-r--r--doc/usage/index.rst1
2 files changed, 50 insertions, 0 deletions
diff --git a/doc/usage/cmd/cat.rst b/doc/usage/cmd/cat.rst
new file mode 100644
index 00000000000..5ef4731fe3f
--- /dev/null
+++ b/doc/usage/cmd/cat.rst
@@ -0,0 +1,49 @@
+.. SPDX-License-Identifier: GPL-2.0+:
+
+cat command
+===============
+
+Synopsis
+--------
+
+::
+
+ cat <interface> <dev[:part]> <file>
+
+Description
+-----------
+
+The cat command prints the file content to standard out.
+
+interface
+ interface for accessing the block device (mmc, sata, scsi, usb, ....)
+
+dev
+ device number
+
+part
+ partition number, defaults to 1
+
+file
+ path to file
+
+Example
+-------
+
+Here is the output for a example text file:
+
+::
+
+ => cat mmc 0:1 hello
+ hello world
+ =>
+
+Configuration
+-------------
+
+The cat command is only available if CONFIG_CMD_CAT=y.
+
+Return value
+------------
+
+The return value $? is set to 0 (true) if the file is readable, otherwise it returns a non-zero error code.
diff --git a/doc/usage/index.rst b/doc/usage/index.rst
index d0641105ae4..a05aa424857 100644
--- a/doc/usage/index.rst
+++ b/doc/usage/index.rst
@@ -31,6 +31,7 @@ Shell commands
cmd/bootmeth
cmd/button
cmd/bootz
+ cmd/cat
cmd/cbsysinfo
cmd/cls
cmd/conitrace