-
Notifications
You must be signed in to change notification settings - Fork 3
Looking at disk space
ncdu
command is best and interactive.
Or there is du
command for a quick view:
du | sort -n
lists all directories with the largest last.
du --max-depth=1 * | sort -n
or, again, avoiding the redundant * :
du --max-depth=1 | sort -n
lists all the directories in the current directory with the largest last.
(-n
parameter to sort is required so that the first field is sorted as a number rather than as text but this precludes using -h
parameter todu
as we need a significant number for the sort)
Other parameters to du
are available if you want to follow symbolic links (default is not to follow symbolic links) or just show size of directory contents excluding subdirectories, for example. du
can even include in the list the date and time when any file in the directory was last changed.