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 !!!!