使用 du -sh /mnt和du -sh /mnt/* 显示的容量不同,是什么原因?
使用 du -sh /mnt和du -sh /mnt/* 显示的容量不同,是什么原因?du -sh /mnt显示的容量是140G,但是使用命令du -sh /mnt/*显示的容量是75G,请问一下是什么原因?
回复 1# 274920831
du -sh /mnt命令:显示/mnt目录的容量。
du -sh /mnt/*命令:显示/mnt目录下的每个目录和文件的容量。 /mnt/*是不包含/mnt/.*,所以以.开头的隐含文件不会被计算在内。
# ls -l
total 0
drwxr-xr-x 2 root root 22 Jan 31 14:50 test
# ls -la
total 0
drwxr-xr-x.4 root root31 Jan 31 14:48 .
dr-xr-xr-x. 18 root root 279 Feb12020 ..
drwxr-xr-x 2 root root22 Jan 31 14:50 test
drwxr-xr-x 2 root root22 Jan 31 14:50 .test
# du -sh /mnt
2.8M /mnt
# du -sh /mnt/*
1.4M /mnt/test
#
页:
[1]