Linux cat command in Example

cat – concatenate files and print on the standard output, is a standard Unix utility that reads files sequentially, writing them to standard output. The name is derived from its function to concatenate files.

Use

Example

View the content of a file

cat exploit.py

Add the content of textfile1 to the textfile2 file.

cat -n textfile1 > textfile2

Add the file contents of textfile1 and textfile2 to the line number (blank lines are not added) and append the contents to textfile3.

cat -b textfile1 textfile2 >> textfile3

Support Our Threat Intelligence

If you find our technology report and cybersecurity news helpful, consider supporting our work.

Crypto QR Code
USDT (TRC20):
TN8BdV8cp4T1Cd28gK9qTAnZknzzuwyUtm
USDT (ERC20):
0x3725e1a7d3bc5765499fa6aaafe307fabcd75bce