Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
du 4GB discrepancy (anecdote)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
WWWW
Tux's lil' helper
Tux's lil' helper


Joined: 30 Nov 2014
Posts: 143

PostPosted: Mon Nov 16, 2015 7:09 pm    Post subject: du 4GB discrepancy (anecdote) Reply with quote

hello,

Trying to find size of folders under billy gate$$$ M$$ I get wildly differing measures:

Code:

du -sh Windows/* | sort -h
16G Windows/winsxs


and

Code:

du -sh Windows/winsxs/
20G Windows/winsxs/


What accounts the 4GB discrepancy? I mean, because now I am only deleting, but I was wondering in some critical app having such a difference value could cause an expensive EN'SAY satellite to de-orbit.

Is this a du or ntfs under linux problem? Although those files aren't really necessary but this wide range in gigas piqued my curiosity.

The winsxs being 16-20GB size is another entirely different WTF off-topic for official m$$ forums.

thanks

p.s.: happens as well with -s option alone (without -h). Just to rule out some sum errors between utilities.
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7470

PostPosted: Tue Nov 17, 2015 7:30 am    Post subject: Reply with quote

Code:
       -d, --max-depth=N
              print the total for a directory (or file, with --all) only if it
              is   N   or  fewer  levels  below  the  command  line  argument;
              --max-depth=0 is the same as --summarize


So because of -s --max-depth is 0

from Windows : winsxs is depth0, winsxs/thatdir is depth1 -> thatdir is not count
from Windows/winsxs : thatdir is depth0

I think it answer you size of winsxs with its file in the first case
and the second one, it answer you size of winsxs with all 1 level subdirectory

Yeah, it mean, even your second answer doesn't really answer you what is the size of winsxs because you might have winsxs/thatdir/again_a_dir and they won't be count), so winsxs may be even bigger than 20G

Avoid using -s if you want good answer

And if your second question is "but why the hell du is doing that?"
Its manpage would answer you again :D
du - estimate file space usage
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6920

PostPosted: Sat Nov 21, 2015 7:29 pm    Post subject: Reply with quote

The most logical explanation is that the directory itself is 4GB in size. Might make sense if it has thousands of files with ACLs and ADSs attached. Windows NT isn't exactly known for stellar filesystem efficiency.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum