linux - centos 下,为什么两个空目录显示大小不一样?
ringa_lee
ringa_lee 2017-04-17 11:36:50
0
1
541

两个空目录, 用du -h 看
一个是 4K 一个是 12K


原来乳齿~
根据 @冰灵果 的答案测试了一下.

rm a -fr for (( j=339; j<341; j++));do mkdir a/$j -p for (( i=0; i<$j; i++));do touch a/$j/$i;done rm a/$j/* done
ringa_lee
ringa_lee

ringa_lee

reply all (1)
Peter_Zhu

如何重现题主的问题

mkdir a ls -l # a = 4096 = 4k #create 500 files in directory a for (( i=0; i<500; i++));do touch a/$i;done rm a/* ls -l # a = 12288 = 12k
    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!