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