Linux cat Command

The cat command in Linux is used to concatenate and display the contents of files. It is one of the most commonly used commands in Linux.

Options and Descriptions

Option Description
-n Number all output lines.
-b Number non-blank output lines.
-s Suppress repeated empty output lines.
-E Display a $ at the end of each line.
-T Display tab characters as ^I.
-A Show all characters, including non-printing characters.

Examples

Here are some examples of using the cat command:

Tee command

The tee command in Linux is used to read from standard input and write to standard output and files. It is often used in pipelines to redirect output to multiple destinations.

Options and Descriptions

Option Description
-a Append the output to the specified file(s) instead of overwriting them.
-i Ignore interrupts.
-p Prompt before overwriting files.

Examples

Here are some examples of using the tee command: