Tuesday 1 January 2019

linux - du -sh : I don't get why these two results are different


I need to know the size of a folder and some of its sub folders. So I'm trying to use the du command.


I cd into the right directory and then try (in bash) :


[xxx@yyy TEST]$ du -sh .
4.1G .

[xxx@yyy TEST]$ du -sh *AAA
3.2G 123_AAA

[xxx@yyy TEST]$ du -sh . *A
4.1G .
2.7G 123_AAA

How is it possible that I get different results for the size of 123_AAA (3,2GB then 2,7GB) with my second and my third command ?


Thank you in advance



Answer



I think du is aware of hardlinks. Try du -shl . *A .


No comments:

Post a Comment

Where does Skype save my contact's avatars in Linux?

I'm using Skype on Linux. Where can I find images cached by skype of my contact's avatars? Answer I wanted to get those Skype avat...