29 Jan 2021 @ 1:37 PM 

TL;DR: ncdu , du -h -d1 /.

On a system where you have root access, you should install the utility ncdu, which offers a friendly way of scanning and displaying the space occupied by the folders in the current directory ncdu (or in the folder sent as parameter when starting the utility: ncdu /).

If you don’t have root access, but you have the ncdu utility pre-installed, you won’t see the true size of the folders, so you should execute sudo ncdu /.

If you don’t have root access and you don’t have the ncdu utility at hand, you are stuck with the old du utility, which by default is pretty verbose (shows the size of each subfolder – if you’re in the root folder, it’s hard to get some meaningful info from the whole screens of data reported), so you should use some parameters to filter the output:

  • du -h -d1 / – use the ‘human’-style display (-h) to show the size in Kb, Mb, Gb, and the depth flag (-d, –max-depth) to help control the depth of directories that the command reports on.
  • du -cBM – max-depth=1 /var/lib/ 2>&1 | grep -v 'denied' | sort -n – to skip displaying errors in case of denied acces to some folders and to sort by size, descending, the remaining first-level folders.

Enjoy!

Posted By: Teodor Muraru
Last Edit: 29 Jan 2021 @ 01:38 PM

EmailPermalinkComments (0)
Tags
Tags: , , , ,
Categories: personal

 Last 50 Posts
 Back
Change Theme...
  • Users » 1
  • Posts/Pages » 84
  • Comments » 8
Change Theme...
  • VoidVoid « Default
  • LifeLife
  • EarthEarth
  • WindWind
  • WaterWater
  • FireFire
  • LightLight

Filme vazute



    No Child Pages.

Carti citite



    No Child Pages.

Muzica



    No Child Pages.