Get the App
SLTechnology News&Howtos  ›  Servers  › 

What are the common and convenient commands for Centos

Shulou Source: shulou.com Published: 2022-06-01 17:40:16 09月12日 Update

This article mainly introduces the common and convenient commands of Centos, which are introduced in great detail and have certain reference value. Friends who are interested must finish reading them.

1. In many cases, you need to know what large files are available on the current system, such as a file size of more than 100m or 1G (the threshold varies). So how to search out these large documents?

# for example: I want to search for files with a size of more than 900m in the current directory

Find. -type f-size + 900m-print0 | xargs-0 du-h

2. Sometimes the disk space is alarmed, and you are usually negligent in managing and monitoring the growth of files, so I need to quickly know which directories have become larger, so we can use the du command to solve this problem.

# for example: I want to query which directory in the root directory has changed a lot (of course, I think it must be / var)

Cd /

Du-h-max-depth=1

3. Return to the home directory

Cd ~

4. If you want to know the state of memory, you can use free and vmstat. You need to pay attention to the value of cached, which is the memory occupied by the kernel, as well as the value of free.

5. Use dmesg to view some hardware or driver information or problems.

The above is all the contents of this article "what are the convenient commands commonly used in Centos?" Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Tags: Files directories commands commonly used memory content size articles questions search value information interests heart kernel guys buddies situations I want Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Tech Info MariaDB MySQL macOS Apple