Linux basic commands -cat

The cat command

cat command connection file and print to standard output, cat often used to display the contents of a file, similar in type command.

Note: When the file is large, the text on the screen quickly flashed (scroll), users often can not see what is displayed. Thus, generally with more split-screen display command. To control the scrolling, you can press Ctrl + S to stop scrolling; press Ctrl + Q key recovery scrolling. Press Ctrl + C (interrupt) key to terminate execution of the command, and returns Shell prompt.

grammar

CAT (option) (parameters)
Options
-n or - Number: 1 for numbering the number of lines of all outputs;
 -b or --number-nonblank: and - n-similar, but not number blank lines;
 -s or --squeeze- blank: when the case of to more than two successive blank lines, with a blank line to line substitution;
 - a: unprintable character display, the display end of line "$";
 -e: equivalent to " -vE " option;
 -t: et price for " -VT " option;

parameter

File list: Specifies a list of files you want to connect.

Examples

Ml and m2 is located two files in the current directory

CAT M1 (displayed on the screen of the content file ml)
 CAT M1 m2 (simultaneously display file contents ml and m2,)
 CAT M1 m2> file (the file into the file after the merge file ml and m2)

 

Guess you like

Origin www.cnblogs.com/lj7xun/p/10983317.html