[CENTOS] Check the capacity of the Linux server. (Df command, du command)

I also search for this every time, so make a note of it.

【df】 List the maximum capacity / used capacity / free space for each partition.

df


df -h
# Filesystem      Size  Used Avail Use% Mounted on
# overlay          59G  2.7G   53G   5% /
# tmpfs            64M     0   64M   0% /dev
# tmpfs          1000M     0 1000M   0% /sys/fs/cgroup
# /dev/sda1        59G  2.7G   53G   5% /etc/hosts
# shm              64M     0   64M   0% /dev/shm
# tmpfs          1000M     0 1000M   0% /proc/acpi
# tmpfs          1000M     0 1000M   0% /sys/firmware

【du】 Display the size of directories and files.

du


du -hs /etc
# 1.5M	/etc

du -h /etc
# 4.0K	/etc/opt
# 12K	/etc/logrotate.d
# 12K	/etc/ld.so.conf.d
# 8.0K	/etc/terminfo
# 16K	/etc/skel
# ……

Remarks

This article is a migration article from the blog "Technical Notes for Chores Engineers". The previous blog will be deleted.

Recommended Posts

Check the capacity of the Linux server. (Df command, du command)
Command to check the number and status of Java threads
[Rails] Check the contents of the object
Check the version of Cent OS
Check the migration status of rails
I tried to check the operation of gRPC server with grpcurl
Check the contents of the Java certificate store
Check the contents of params with pry
Check once again about the OpenSSL command
Memo: [Java] Check the contents of the directory
Check the version of the standard Web software.
[Java] Check the number of occurrences of characters
Check the operation of the interface through threads
Check the version of the JDK installed and the version of the JDK enabled
[Laravel] Command memorandum until the start of the project
Let's check the feel of Spring Boot + Swagger 2.0