1. in many cases, you need to know the large files in the current system, such as the file size exceeding MB or 1 GB (the threshold value depends on the actual situation ). How can we search these large files? # For example, if you want to search for files larger than MB in the current directory, find. -typef-size + 900M-print0 | xargs-0du-h2, sometimes disk space alarm, and you usually neglect management, monitoring
1. in many cases, you need to know the large files in the current system, such as the file size exceeding MB or 1 GB (the threshold value depends on the actual situation ). How can we search these large files?
# For example, I want to search for files larger than MB in the current directory.
Find.-type f-size + 900 M-print0 | xargs-0 du-h
2. sometimes the disk space alarm is triggered, and you usually neglect the management and monitoring file growth, so I need to quickly know which directories are getting bigger, now we can use the du command to solve this problem.
# For example, I want to query which Directory under the root directory is relatively large (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 memory status, you can use free and vmstat. pay attention to the value of cached, which is the memory occupied by the kernel and the value of free.
5. use dmesg to view some hardware or driver information or problems.