Reputation: 399
Ciao, I have the following problem.
When I use the command du -hs foldername I can see that the folder I am analysing has a size of 80Gb.
But if use cd foldername and rerun the script (or the code ls -lah to see the details of each file) I can not find files that justify that size.
Can you explain me why?
How can I find the files/folder that more than anyone contribute to the 80Gb?
Thank you for your help
Upvotes: 1
Views: 784
Reputation: 239672
Probably because *
doesn't include files/directories with names that start with a dot.
Instead of using du -sh *
, use du -ah -d 1
. It will start at the current directory, instead of taking a list of files/directories from the commandline. -a
tells it to include files as well as directories, and -d 1
tells it to list down to a "maximum depth" of 1, i.e. show files in the current directory, and show the totals for subdirectories of the current directory, but don't show a detailed list of everything in those subdirectories.
Upvotes: 2