I was looking through my system with du -sch ./*
to find the big useless files I may have stockpiled with no reason, when I found this:
$ du -sch ./*
du: cannot read directory ‘./drbunsen/.gvfs’: Permission denied
du: cannot read directory ‘./drbunsen/.cache/dconf’: Permission denied
18G ./drbunsen
18G total
$ cd drbunsen/
$ du -sch ./*
601M ./Desktop
20K ./Documents
598M ./Downloads
4.0K ./flash
4.0K ./Music
8.0M ./Pictures
4.0K ./Public
4.0K ./Templates
4.0K ./Ubuntu One
8.0K ./Videos
11G ./VirtualBox VMs
6.9M ./workspace
12G total
How do I make hidden files visible? du -sch ./.*
gives the same result as du -sch ./*
.
du -hs .[^.]* *
for all hidden files, excluding.
and..
which other answers seem to be missing.dotglob
shell option. I use a subshell here so that it does not affect globally for other commands =>(shopt -s dotglob; du -shc *)
*
do?()
start a subshell.