Linux Commands Reference - Complete Linux Command Guide

Comprehensive Linux command reference with 150+ commands. Search, filter by category, and view detailed usage examples.

Share
Back to commands

cat

Concatenate files and print to stdout

Syntax

cat [OPTION]... [FILE]...

Common Options

-nNumber all output lines
-bNumber nonempty output lines
-sSuppress repeated empty lines
-EDisplay $ at end of each line
-TDisplay TAB characters as ^I

Common Examples

cat file.txt

Display file content

cat -n file.txt

Display with line numbers

cat file1.txt file2.txt > combined.txt

Concatenate multiple files

cat > file.txt

Create file from stdin

Related Commands

Related Tools

More Code & Dev Tools