Common commands in Linux and Common commands in linux
Common Linux commands
Uniq command: Concept: used to count or ignore duplicate lines in a file. It is generally used in conjunction with the sort command. Format: uniq [parameter] filename parameter:-c or -- count: displays the number of repeated occurrences of this row next to each column-d or -- repeated: show only duplicate rows-u or -- unique: show only the row seq command that appears once: Concept: used to generate all integers between a certain number and another number. Format: seq [parameter] first number second number parameter:-f or -- format = format use printf style floating point format (% g by default) eg: seq-f "% 3g" 1 10 # Note: 3 in "% 3g" indicates the number of digits, and 03 in "% 03g" indicates the number of digits, if the number of digits is not enough, add 0. -S or -- separator = string use the specified string to separate numbers (by default, the linefeed \ n) eg: seq-s "|" 1 10-w or -- equal-width add 0 before the column, if the width is the same, you cannot use the eg: seq-w 1 10mpstat command with-f. Concept: mpstat is the abbreviation of Multiprocessor Statistics and the multi-processor Statistics monitoring command. Format: mpstat [-P {cpu ID | ALL}] [internal [count] parameter:-P indicates the monitored cpu. value: the cpu number or ALLinternal indicates the query interval. The unit is second count, indicating the number of queries. If interval and count are omitted, the query is performed only once by default. Example: mpstat-p all 5 2 # query the statistical information of ALL CPUs every 5 seconds for a total of two times. Result: Linux 2.6.32-431. el6.x86 _ 64 (hostname) 01/01/2017 _ x86_64 _ (48 CPU) 05:41:51 CPU % usr % nice % sys % iowait % irq % soft % steal % guest % idle05: 41: 56 PM all 0.46 0.00 0.20 0.01 0.00 0.05 0.00 0.00: 41: 56 PM 0 99.2905 1.41 0.00 0.40 0.00 0.00 0.20 0.00 0.00: 41: 56 PM 1 0.80 0.00 0.60 0.20 0.00 0.00 0.00 0.00 98.3905: 41: 56 PM 2 2.43 0.00 1.21 0.00 0.00 0.61 0.00 0.00 95.7505: 41: 56 PM 3 0.20 0.00 0.20 0.00 0.00 0.00 0.00 0.00: 41: 56 PM 4 99.6005 1.80 0.00 1.00 0.00 0.00 0.60 0.00 0.00: 41: 56 PM 5 0.20 0.00 0.20 0.00 0.00 0.00 0.00 0.00 99. 60...