Linux Common Command Learning

Source: Internet
Author: User

First, testing procedures

Probing process, PS: viewing process details

Real-time monitoring process, top: real-time output for details and related system performance parameters

End Process, kill

Ii. Monitoring of disk space

Mount storage media, mount:mount/dev/sda1 On/boot

Common File System types:

Vfat:windows Long File system

Advanced file systems widely used in Ntfs:windowsnt,xp,vista and Win7

ISO9600: Standard CD-ROM file system; The data CD must use this file system type

Uninstalling mobile devices, Umount [Directory|device]: umount/home/rich/mnt

Disk view, DF

Displays specific disk usage,du: This command displays all files in the current directory, disk usage for directories and subdirectories, and disk blocks to indicate how much storage space each file or directory occupies. This command can quickly determine if there is a large file in a directory on the system. It is possible to output large amounts of data and need to process the data to find the results the administrator wants.

Command-line arguments:

-C: Displays the total size of all listed files

-H: User-readable mode

-S: Show totals for each output parameter

Iii. Processing of data files

Sort, Sort:

Command parameters:

-N: Tells the sort command to recognize numbers as numbers instead of characters and sort by value

-M: Tell the sort command to recognize the date stamp in the log file as the month, not the English character, and sort, jan,feb,mar,apr ...

-F: Ignore case;-R: Reverse order

-K:KEY=POS1,[POS2]: Sort starting from pos1, if there is pos2, then end to Pos2.

-T: Specifies a character to distinguish the key position. In the following example, the/etc/passwd file is sorted by the value of the third position by using: as a delimiter.

The above file processing commands are useful for du viewing file usage, such as Du-sh *|sort-nr > Abc.txt

    

Search data, grep [options] pattern [file]

grep three file1: Find three text in the file file1.

Command-line arguments:

-V: Reverse search, output does not match the pattern of the line, grep-v three file1

-N: Line number showing the matching pattern, grep-n three file1

-C: Shows how many rows contain matching patterns

-E: Matches multiple modes, GREP-E t-e three file1

Compressed data, gzip most popular

bzip2 extension. bz2

gzip extension. gz

Zip extension. zip

Gzcat: Viewing the contents of a compressed text file

Gunzip: Used to extract files

Archived data, Tar

Linux Common Command Learning

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.