Common Linux commands
I. Detection Program
Probe process, ps: view process details
Real-time Monitoring process, top: Real-Time Output for details and Related System Performance Parameters
Process Termination and kill
Ii. Monitoring disk space
Mount storage media, mount: mount/dev/sda1 on/boot
Common file system types:
Vfat: Windows persistent File System
Ntfs: Windows SNT, XP, Vista, and Win7 are widely used advanced file systems.
ISO: Standard CD-ROM file system; Data CD must use this file system type
Unmount a mobile device, umount [directory | device]: umount/home/rich/mnt
Disk view, df
Displays the usage of a specific disk,Du: This command displays the disk usage of all files, directories, and sub-directories in the current directory. the disk blocks indicate how much storage space each file or directory occupies. This command can quickly determine whether a large file exists in a directory on the system. A large amount of data may be output. You need to process the data and find the result that the administrator wants.
Command line parameters:
-C: displays the total size of all listed files.
-H: Easy-to-Read mode
-S: displays the total of each output parameter.
3. process data files
Sorting, sort:
Command parameters:
-N: tells the sort command to recognize numbers rather than characters and sort them by values.
-M: Tell the sort command to recognize the date stamp in the log file as a month, instead of an English character, and sort, Jan, Feb, Mar, Apr .....
-F: Case Insensitive;-r: Reverse Order
-K: key = pos1, [pos2]: Sorting starts from pos1. If pos2 exists, it ends with pos2.
-T: Specifies a character used to differentiate key locations. In the following example, the/etc/passwd file is sorted by the value at the third position as the separator.
The preceding file processing commands are very useful for du to view the file usage, for example, du-sh * | sort-nr> abc.txt.
Search data, grep [options] pattern [file]
Grep three file1: Find the three text in file file1.
Command line parameters:
-V: reverse search. The output does not match the rows in this mode. grep-v three file1
-N: displays the row number in the matching mode, grep-n three file1
-C: shows how many rows contain matching modes.
-E: matches multiple modes, grep-e t-e three file1
Compressed Data and gzip are the most popular
Bzip2 extension name .bz2
Gzip extension. gz
Zip extension. zip
Gzcat: view the content of compressed text files
Gunzip: used to extract files
Archive data, tar