Format
Df-h Viewing disk partitions
The DU/ETC directory file size is listed in units that are k the last line is the sum
Du-m Unit is m less than 1m write 1m
Du-h Unit humanized Display k/m
DU-SH/ETC viewing the Pointing directory/file size
//////////////////////////////////////////////////////////////////////////////////////
Du view and LS view differences
[Email protected] ~]# Du-sh/etc/init.d/iptables
12k/etc/init.d/iptables
[Email protected] ~]# Ls-lh/etc/init.d/iptables
-rwxr-xr-x. 1 root root 11K July 10:08/etc/init.d/iptables///////du-12k ls-11k
Convert to K units
[Email protected] ~]# Ls-lb/etc/init.d/iptables
-rwxr-xr-x. 1 root root 11048 July 10:08/etc/init.d/iptables
[Email protected] ~]# Du-sb/etc/init.d/iptables
11048/etc/init.d/iptables////////ls-11048b du-11048b the same.
////////////////////////////////////////////////////////////////////////////////////////////////////
[Email protected] ~]# Touch/tmp/1.txt
[Email protected] ~]# echo ">>/tmp/1.txt"
[Email protected] ~]# Ll/tmp/1.txt
-rw-r--r--. 1 root root 3 November 6 19:35/tmp/1.txt/////true Size
[Email protected] ~]# Du-sh/tmp/1.txt
4.0k/tmp/1.txt/////takes up the size of the disk block
Linux command-du view disk space usage