Study Notes for Linux _ Day4 and Study Notes _ day4

Source: Internet
Author: User

Study Notes for Linux _ Day4 and Study Notes _ day4

The fourth day, continue learning. Today, I saw a saying, "What do you think is what you think? ", This sentence is a bit interesting !!!

 

1. Command for viewing File Content

File dest: view the file type. In Linux, file types include text files, directories, linked files (hard links and soft links), script files (executable files), and binary files.

Cat dest: view all contents of the file.

Cat-n dest: view all the content of the file and add a row number to each row. The-n parameter adds a line number to all rows, provided that each row has a line break.

More dest: view the file content by page. You can press space or enter to continue browsing and press q or Q to exit.

Tail dest: view the content of the last 10 rows. The default value is the last 10 rows. Tail actually means the tail, so...

Tail-n num dest: view the content of the last num row. You can also write it as tail-num dest, where num is the parameter value.

Tail-f dest: dynamically view the file content. This command can detect system logs in real time.

Head dest: view the content of the first 10 rows. The default value is the first 10 rows.

Head-n num dest: view the content of the previous num row. You can also write it as head-num dest, where num is the parameter value.

Next, demonstrate the effect of each command

File dest, 4-1, a Unicode-encoded text file

    

Figure 4-1

Cat dest, 4-2 shown

    

Figure 4-2

Cat-n dest, 4-3

    

Figure 4-3

More dest, 4-4

    

Figure 4-4

Tail dest, as shown in 4-5

    

Figure 4-5

Tail-n num dest, as shown in 4-6

    

Figure 4-6

Head dest, 4-7

    

Figure 4-7

Head-n num dest, as shown in 4-8

    

Figure 4-8

 

 

Happy Day4 !!!!

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.