I've been using "du -hs ~/" to get the size of my total home directory with outputs 20GB, and I've been trying to where large files that I can delete to free up some space. However, when using "du -hs ~/*" I get numerous outputted files but they don't sum to 20GB. There are a few hidden files but they aren't shown.
How can I print out the size of hidden files, and also locate the largest files/directories via command line?
Thank you!
To size all the files in home directories including hidden files
du -sh $(ls -A)
du -sh .[^.]* *
To size only normal files
du -sh *
To size only hidden files
du -sh .[^.]*
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With