commands for viewing the contents of a file under LinuxCommands to view the contents of a file:Cat starts displaying content from the first line and outputs all contentThe TAC displays the contents in reverse from the last line and outputs all the contentMore according to the window size, one page of the actual file contentLess is similar to more, but its advantages can be a page forward, and the ability to search for charactersHead only shows the fir
Commands to view the contents of a file:Cat starts displaying content from the first line and outputs all contentThe TAC displays the contents in reverse from the last line and outputs all the contentMore according to the window size, one page of the actual file contentLess is similar to more, but its advantages can be a page forward, and the ability to search for charactersHead only shows the first few linesTail show only the last few linesNL similar
The Linux view log file Contents command has
Cat starts displaying file contents from the first line
The TAC is displayed in the last line, and you can see that the TAC is cat's backwards write
NL display, the output line number!
More page-by-page display file contents
Less is similar to more, but better than more, he can page forward!
Head's just a few lines.
Tail only look
lungs, empty hot self-safety.Tian Men Gan Han, lung flat lung qi, phlegm stop, breathing hot active.Huanglian taste bitter, diarrhea in addition to the heart, clear heat and bright eyes, thick intestinal diarrhea.Huangqin bitter cold, dry and diarrhea lung fire, Ziqing large intestine, hot and humid heat can be.Huang Bai bitter cold, fire, Yin, bone steam hot and humid, blood can be any.Gardenia cold, clear off the trouble, vomit stomach heat, fire and urine.Suspense bitter cold, can eliminate
script, and the advent of the new syntax completely changes the situation.Dole (columns) Usage column number and column widthRegardless of how many columns of text you want to display, you need only two properties: column-count and column-width .column-countproperty to set the specific number of columns, for example:style= "column-count: 2;" There's always been a headache in >css, and it's a hassle to create layouts. Of course, there are many ways, t
Sneeze Workers cold 3 people
Sneeze Nurse Allergy 1 people
Sneeze Farmer Allergy 13 people
Sneeze Worker Allergy 16 people
Sneeze Farmer Concussion 3 people
Sneeze Workers concussion 7 people
Headache workers cold 10 people
Headache Teacher Cold 12 people
Headache Farmer Cold 5 people
To view the content in the file, you can use many commands. Today I will introduce several commonly used commands for viewing the file content. Of course, there is an ace command (Tool) vim on the Linux system. The use of this tool has been described in detail in vi/vim, you can also edit it easily. Today, we mainly look at the content in the file, not editing it.
Common commands for viewing File Content
Cat displays the file content starting with the first line
tively setting it to null.
Note that this command does not affect positional parameters
9. The export Command makes availables to all child processes of the running script or shell. Unfortunately, there is no way to export variables back to the parent process,
The process that called or invoked the script or shell. One import use of the Export command is in startup files, to initialize and make accessible environmental variables to subsequent user processes.
10. Jobs command
Lists the
sides of a national border (different provinces in China). It is xy1y2.
X: Operator (Post and Telecommunications x = 1, China Unicom = 0)
Y1 and Y2: distribution is shown in Table 5-1.
Table 5-1 y1y2 allocation
Y2
Y101
0Jilin, Gansu, Tibet, Guangxi, Fujian, Hubei, Beijing, and SusuHeilongyi, Liaoning, Ningxia, Sichuan, Hainan, xianxi, Tianjin, Shanxi, and Shandong
1Xinjiang, Guangdong, Hebei, Anhui, Shanghai, Guizhou, and ShaanxiInner Mongolia, Qinghai, Yunnan, Henan, Zhejiang, AND HUNAN
NCC =
network is 0l. Msin = Mobile customer identification code, which consists of 11 digits. Uniquely identifies China Mobile clients in China's GSM mobile communication network.
International mobile device identification code (IMEI) Uniquely identifies the code of a mobile device, which is a 15-digit decimal number. Its structure is: 6-digit, 2-digit, 6-digit, L-digit, Tac fac snr sp tac = model approval code,
structure is:
3bit 3bit
NCC BCC
| -------- Bsic ------------- |
NCC = a national color code. It is mainly used to differentiate operators on different sides of a national border (different provinces in China). It is xy1y2.
X: Operator (Post and Telecommunications x = 1, China Unicom = 0)
Y1 and Y2: distribution is shown in Table 5-1.
Table 5-1 y1y2 allocation
Y2
Y101
0Jilin, Gansu, Tibet, Guangxi, Fujian, Hubei, Beijing, and SusuHeilongyi, Liaoning, Ningxia, Sichuan, Hainan, xianxi, Tianjin, Sh
unique.Structure:IMEI = TAC + FAC + SNR + SP (15 digits)The TAC model approval code is assigned by the European model approval center with the first two country codesThe final assembly code of FAC indicates that the factory or the final assembly location is encoded by the manufacturer.The SNR serial number uniquely identifies each TAC and FAC mobile deviceSP-Spa
Linux Study Notes 2_mysql installation, Study Notes 2_mysql
There are many commands for viewing file content: cat, tac, more, less, head, tail, nl.
Cat displays the file content from the first line. tac displays the file content from the last line. You can see that tac is a reverse write of cat. more displays the file content on one page; less is similar to more,
TAB
4. Command instance:
Instance 1:Output The log22.txt file content and add the row number
Command: cat-n log22.txt log33.txt
Example 2:Merge the contents of the two files and add the row number.
Command: cat-B log22.txt log33.txt
Note: add the line numbers of the log22.txtand log33.txt files and print them to the screen.
Example 3:Add the row number of the file content and input it to another file.
Command: cat-n log22.txt> log. log
Note: add the log22.txt file with the row number and inp
period of time-time is a configurable parameter. This is the screen when tload is running:
Tload: Can you see the changes in the system load?
Segfault debugging ASSISTANT: catchsegv
Catchsegv can help people diagnose program "segment errors (BKJIA edit Note: segmentation fault, segfault. This error is common in C Programs and is usually caused by access to invalid memory addresses )". If you are processing an application that frequently shows "segfault", start it with catchsegv and observe the
(range. Man makes it clearer. The row [plain] $ cat test.txt line1 line2 line3 line4 line5 line6 $ sed-n '/[1-3]/is not printed. P'test.txt line4 line5 line6 let's look at a complex example and reverse the text 1) First sed reads the first row to the mode space and then copies it to the hold space 2) then sed reads the second row to the mode space and appends the reserved space to the mode space (the mode space is now the second row and the first row ), copy the mode space to the hold space and
: displays the end symbol of a row $Example: cat-n/etc/fstab -- View/etc/fatab content and display the row number-- Tac: view text content in flashbackFormat: tac [OPTION]... [FILE]...Example: tac/etc/passwd -- view text content in flashback-- Head: displays text. The first 10 lines are displayed by default.Format: head [OPTION]... [FILE]...-N #: show text header
will be updated only when the source is switched to a new one.4. Check the file contentCommands for viewing file content include:Cat: displays the file content starting from the first line;Tac: displays the file content from the last line;Nl: displays the row number of the table;More: displays the file content one page at a time;Less: similar to more, and you can flip the page forward;Head: only the first few rows;Tail: only the last few rows;Od: Rea
Game 566.11 Chapter Summary 57The 7th chapter uses the debugger 587.1 bug! 587.2 Debugger 597.3 Stepping 617.4 Find Bug 637.5 Breakpoint 667.6 Example of using breakpoints 677.7 Chapter Summary 688th Chapter Flowchart 698.1 How to play Hangman 698.2 Hangman Run Example 698.3 ASCII word metalized 718.4 Use flowchart to design a program 718.5 Generating Flowchart 738.6 Chapter Summary 799th Chapter Hangman 81Source code for 9.1 Hangman 819.2 Multi-line string 869.3 Constant 869.4 List 869.5 Metho
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.