Basic Bash Shell command--2

Source: Internet
Author: User
Tags disk usage

1.ps

Review the process. It only shows the processes that are currently user-owned under the current console, including bash and PS commands themselves.

2.top

Real-time detection process. The first line of the output shows an overview of the system (current time, system run time, number of users logged in, and average load on the system). The second line shows the process information for the profile. The third line shows the CPU information. Row four shows the memory usage. The five lines show the usage of the system swap space. The last section displays a detailed list of the processes that are currently running. Examples are as follows:

3.kill/killall

End the process.

The KILL command sends a signal to the process through the PID, the process number. By default, the KILL command sends a term signal to all of the PID listed on the command line (inter-process signaling communication).      The term signal tells the process to stop running if the process ignores the term signal and can use an int or hup signal. Eg:kill 3940

Killall supports the process name rather than the process number to end the process, and wildcard characters are supported.

Eg:killall http*

4.mount

Mount the media and output the device mounted on the current system.

Eg:mount-t Vfat/dev/sdb1/media/disk manually mount the USB drive/dev/sdb1 to the/media/disk.

5.umount

Uninstall the mobile device.

Eg:umount/home/usr/mnt

6.df

View the usage of all mounted disks.

7.du

Displays disk usage for a specific directory.

8.sort

Sort the data, sort commands the data in the text file according to the collation of the default language. When numbers are sorted, numbers are treated as strings, and to sort numbers, use-n is used.

Eg:sort-n file1

9.grep

Finds the line in the input or in the specified file that contains the characters that match the specified pattern. Specifies that the pattern can use regular expressions.

Eg:grep three file to find the row in file that contains the three.

Basic Bash Shell command--2

Related Article

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.