How to use the cat command in Linux
The cat command (short for “concatenate”) lists the contents of files to the terminal window. This is faster than opening the file in an editor, and there’s no chance you can accidentally alter the file.
Display Contents of File
Display Contents of File. Awaits input from user, type desired text and press CTRL+D (hold down Ctrl Key and type ‘d‘) to exit. The text will be written in test2 file.
With files longer than the number of lines in your terminal window, the text will whip past too fast for you to read. You can pipe the output from cat through less to make the process more manageable. Type q to quit from less.
# User specific aliases and functions alias rm='rm -i' ......
The syntax for the cat command is as follows:
Usage: cat [OPTION]... [FILE]... OPTIONS:-A, --show-allequivalent to -vET-b, --number-nonblanknumber nonempty output lines, overrides -n-eequivalent to -vE-E, --show-endsdisplay $ at end of each line-n, --numbernumber all output lines-s, --squeeze-blanksuppress repeated empty output lines-tequivalent to -vT-T, --show-tabsdisplay TAB characters as ^I-u(ignored)-v, --show-nonprintinguse ^ and M- notation, except for LFD and TAB--helpdisplay this help and exit--versionoutput version information and exit