cat

Command Function

This command is used to display the content of a text file.

Syntax

cat [pathname]

Parameters

Table 1 Parameter description

Parameter

Description

Value Range

pathname

Specifies the file path.

An existing file

Usage

Run the cat [pathname] command to display the content of a text file.

Example

Run cat hello-harmony.txt.

Output

Content of hello-harmony.txt

OHOS # cat hello-harmony.txt
OHOS # Hello Harmony ;)