• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# cat
2
3## Command Function<a name="section16710153391315"></a>
4
5This command is used to display the content of a text file.
6
7## Syntax<a name="section1699392313158"></a>
8
9cat \[_pathname_\]
10
11## Parameters<a name="section1677217374136"></a>
12
13**Table  1**  Parameter description
14
15<a name="table1049mcpsimp"></a>
16<table><thead align="left"><tr id="row1055mcpsimp"><th class="cellrowborder" valign="top" width="21%" id="mcps1.2.4.1.1"><p id="p1057mcpsimp"><a name="p1057mcpsimp"></a><a name="p1057mcpsimp"></a><strong id="b2166111484619"><a name="b2166111484619"></a><a name="b2166111484619"></a>Parameter</strong></p>
17</th>
18<th class="cellrowborder" valign="top" width="52%" id="mcps1.2.4.1.2"><p id="p1059mcpsimp"><a name="p1059mcpsimp"></a><a name="p1059mcpsimp"></a><strong id="b17121718469"><a name="b17121718469"></a><a name="b17121718469"></a>Description</strong></p>
19</th>
20<th class="cellrowborder" valign="top" width="27%" id="mcps1.2.4.1.3"><p id="p1061mcpsimp"><a name="p1061mcpsimp"></a><a name="p1061mcpsimp"></a><strong id="b6990101716464"><a name="b6990101716464"></a><a name="b6990101716464"></a>Value Range</strong></p>
21</th>
22</tr>
23</thead>
24<tbody><tr id="row1062mcpsimp"><td class="cellrowborder" valign="top" width="21%" headers="mcps1.2.4.1.1 "><p id="p1064mcpsimp"><a name="p1064mcpsimp"></a><a name="p1064mcpsimp"></a>pathname</p>
25</td>
26<td class="cellrowborder" valign="top" width="52%" headers="mcps1.2.4.1.2 "><p id="p1066mcpsimp"><a name="p1066mcpsimp"></a><a name="p1066mcpsimp"></a>Specifies the file path.</p>
27</td>
28<td class="cellrowborder" valign="top" width="27%" headers="mcps1.2.4.1.3 "><p id="p1068mcpsimp"><a name="p1068mcpsimp"></a><a name="p1068mcpsimp"></a>An existing file</p>
29</td>
30</tr>
31</tbody>
32</table>
33
34## Usage<a name="section186772414131"></a>
35
36Run the  **cat**  \[_pathname_\] command to display the content of a text file.
37
38## Example<a name="section12158131814561"></a>
39
40Run  **cat hello-harmony.txt**.
41
42## Output<a name="section183926225561"></a>
43
44Content of  **hello-harmony.txt**
45
46```
47OHOS # cat hello-harmony.txt
48OHOS # Hello Harmony ;)
49```
50
51