The /var/lib
contains some unreadable contents, one of which is the mysql
folder. I wanted to see the size of the /var/lib
folder and the mysql
folder in particular. Right-clicking on it and clicking on the "Properties" option gives me this:
In case you need the specs:
- Ubuntu 12.10
- Nautilus 3.4.2
EDIT:
`du -sh /var/lib` gives me this:
du: cannot read directory `/var/lib/sudo': Permission denied
du: cannot read directory `/var/lib/tor': Permission denied
du: cannot read directory `/var/lib/udisks2': Permission denied
du: cannot read directory `/var/lib/php5': Permission denied
du: cannot read directory `/var/lib/openfire': Permission denied
du: cannot read directory `/var/lib/gdm': Permission denied
du: cannot read directory `/var/lib/lightdm': Permission denied
du: cannot read directory `/var/lib/polkit-1': Permission denied
du: cannot read directory `/var/lib/mysql': Permission denied
du: cannot read directory `/var/lib/libvirt/qemu': Permission denied
du: cannot read directory `/var/lib/libvirt/sanlock': Permission denied
du: cannot read directory `/var/lib/libvirt/images': Permission denied
du: cannot read directory `/var/lib/libvirt/boot': Permission denied
266M /var/lib
and sudo du -sh /var/lib
gives this:
309M /var/lib
sudo du -sh lib/ should do the job. It is showing the size greater than it shows in "Properties" window. root login is required as only root may be having access to some files. Hence the permission denied and unreadable content errors.
This is normal behavior. Some of the sub-directories in /var/lib are owned by the services that store files there and cannot be read by other users.
You can view the contents and get sizes of folders/files from the terminal.
gives you an integer in bytes. That's about as exact as you can get! Make sure you leave the trailing / because sudo du -b /var/lib will return the size of every file in there.