Home > System Tutorial > LINUX > body text

Introduction to a collection of commonly used and convenient commands and techniques in Centos

WBOY
Release: 2024-01-07 16:50:23
forward
807 people have browsed it

1. Many times, you need to know what large files there are in the current system, for example, the file size exceeds 100M or 1G (the threshold depends on the specific situation). So how to search these large files?

#For example: I want to search for files exceeding 900M in the current directory

find . -type f -size 900M -print0 | xargs -0 du -h

2. Sometimes there is a disk space alarm, and you usually neglect to manage and monitor the growth of files. Then I need to quickly understand which directories have become larger. At this time, we can use the du command to help us solve the problem. this problem.

#For example: I want to query which directory under the root directory has become larger (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 status of the memory, you can use free and vmstat. You need to pay attention to the cached value, which is the memory occupied by the kernel, and the free value.

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

The above is the detailed content of Introduction to a collection of commonly used and convenient commands and techniques in Centos. For more information, please follow other related articles on the PHP Chinese website!

source:jb51.net
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!