Command Permissions : All Users
command usage : Cat [Parameter Options] [file]
command : output a file or standard input combination to a standard output or file
The options for the Cat command are as follows:
- -a,–show-all equals-vet.
- -b,–number-nonblank number of non-null output lines
- -E equals-ve
- -e,–show-ends Show "$" at the end of each line
- -n,–number all line numbers for the output
- -s,–squeeze-blank does not output multiple lines of blank lines
- -T vs.-VT equivalence
- -t,–show-tabs to display the ^i character as the Jump cell
- -U (ignored)
- -v,–show-nonprinting use ^ and M-references, except LFD and TAB
Help display this help message and exit
–version display version information and exit
If no file is specified, or if the file is "-", it is read from the standard input.
There is an unwritten rule in Linux, where an abbreviation for a letter begins with a minus sign, and all the arguments for the whole word are prefaced with two minus signs.
Example:
Display file contents in standard output
Display file contents and add line numbers in standard output
Display the file contents in standard output and add $ at the end of each line
Add line numbers and terminator $ per line
Two parameters exchangeable position
- Display multiple files simultaneously
Multiple files are output in turn (consider multiple files as one file)
- Output a file with line number and end-of-line terminator to a new file
Note:> is create file,>> is append file content
- Merge files can be implemented using the 5 and 6 above
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
"Linux Commands-File management class" Cat command