This chapter mainly wraps the contents: Historical command Review, and other commands
Catalog management: LS, CD, pwd, mkdir, rmdir, tree
File management: Touch, stat, file, RM, CP, MV, Namo
Date Time: date, clock, Hwclock, Cal
Text view commands: Cat, TAC, more, less, head, tail
Cat: Connect and display.
-N: Show line numbers
-e: Show end symbol (Linux end symbol is $)
-T: Show tabs
-V: Show nonprinting symbols
-A: Show all symbols
File 1 File 2: Link file 1 with the contents of file 2 for display
TAC: Turn the contents of the display back
CTRL + C: Force end.
Split-screen display commands: More, less
Space: Turn Back one screen
B: Flip One screen forward
Enter: Turn back one line
K: Turn the line forward.
MORE: Often want to turn back, the last page will be launched. Less: Often back page, the last one does not exit, only Q to quit.
Head: View top N rows, default is 10
Tail: View the following n rows.
-N: View the first few lines.
-f (Tail available): Displays the appended contents of the file immediately.
-----------------------------------------------------------------------------------------------------------
[Email protected] ~]# head-3/etc/inittab
# Inittab is a used by upstart for the default runlevel.
#
# ADDING Other CONFIGURATION here would have NO EFFECT on YOUR SYSTEM.
Text processing: Cut, join, SED, awk
cut:-d: Set delimiter, default to Space
-F: Specifies the field to display. F1: Displays the first column. f1,3: Indicates that 1 columns and 3 columns are displayed. F1-3: Indicates that 1-3 columns are displayed.
--------------------------------------------------------------------------------------------------------------- --------------
[Email protected] ~]# cut-d:-f1,3,5-7/etc/passwd
Root:0:root:/root:/bin/bash
Bin:1:bin:/bin:/sbin/nologin
Daemon:2:daemon:/sbin:/sbin/nologin
[Email protected] ~]# head-3/etc/passwd
Root:x:0:0:root:/root:/bin/bash
Bin:x:1:1:bin:/bin:/sbin/nologin
Daemon:x:2:2:daemon:/sbin:/sbin/nologin
Sort command: Sort
Sort: Does not affect the contents of the file, sorted by the first word in the document Fu Shen order.
-N: Sorts by numeric size.
-R: Reverse order.
-T: Field delimiter
-K: The first few lines. The field in which to sort.
-U: Do not display duplicate rows
-F: Sorting is case insensitive
Uniq: Show or ignore duplicate rows (duplicate and same behavior repeat line)
-D: Show only duplicate rows
-D: Show all duplicate rows (several lines are repeated several times)
-C: Displays the rows and describes the number of repetitions per line.
Text statistics: WC (Word count): line, number of characters, number of bytes (space also wrapped)
[Email protected] ~]# wc/etc/issue
3 75/etc/issue
-L: Show only rows
-W: number of words
-M: Number of characters
-L: Maximum number of characters for the longest line
Character processing commands: tr: convert or delete characters
TR Options ... set1 ...
Tr ' A-Z ' A-Z ' </etc/passwd
-D: Delete all the enactment characters that appear in the character set
This article is from the "ice is Asleep water" blog, please be sure to keep this source http://278893181.blog.51cto.com/3156502/1622891
Linux Basics 4