Linux accumulate commands for the cat and WC

Source: Internet
Author: User

Cat has three main functions: 1. Display the entire file at once. $ cat filename 2. Create a file from the keyboard. $ cat > FileName can only create new files and cannot edit existing files. 3. Merge several files into one file. $cat file1 file2 > file

Function Description: Calculates the number of words. Syntax: WC [-clw][--help][--version][file ...] Supplemental instructions: We can calculate the number of bytes, words, or columns of a file by using the WC instruction, if you do not specify a file name, or the given file name is "-", The WC instruction reads the data from the standard input device. Parameter:-C or--bytes or--chars shows only the number of bytes. -L or--lines displays only the number of columns. -W or--words displays only the number of words.

Combo command

Statistics log contains ice.connectionrefusedexception how many rows of statistical IP traffic can also be used

cat/data/resin/log/xnshare.stdout.log.20101018 |grep "Ice.connectionrefusedexception" |wc-l

Linux accumulate commands for the cat and WC

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.