"Linux Commands-File management class" Cat command

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.