blob: b22dc6184a272d9b77d1b68cf075bd3ff5e0f25a [file] [log] [blame]
Roger Knecht11827c42022-09-03 11:34:53 +00001.. SPDX-License-Identifier: GPL-2.0+:
2
Heinrich Schuchardt1b0c3162024-01-14 14:53:13 +01003.. index::
4 single: cat (command)
5
Roger Knecht11827c42022-09-03 11:34:53 +00006cat command
Heinrich Schuchardtb72160b2023-10-28 11:59:32 +02007===========
Roger Knecht11827c42022-09-03 11:34:53 +00008
9Synopsis
10--------
11
12::
13
14 cat <interface> <dev[:part]> <file>
15
16Description
17-----------
18
19The cat command prints the file content to standard out.
20
21interface
22 interface for accessing the block device (mmc, sata, scsi, usb, ....)
23
24dev
25 device number
26
27part
28 partition number, defaults to 1
29
30file
31 path to file
32
33Example
34-------
35
36Here is the output for a example text file:
37
38::
39
40 => cat mmc 0:1 hello
41 hello world
42 =>
43
44Configuration
45-------------
46
47The cat command is only available if CONFIG_CMD_CAT=y.
48
49Return value
50------------
51
52The return value $? is set to 0 (true) if the file is readable, otherwise it returns a non-zero error code.