Unix Disk Usage

A very handy command to see the total size of a directory on a Unix-based computer.

du -sh *

This will show the total size of files and directories in your current working directory. The s flag means to show a summary–which basically just shows the top level directory only, instead of the contents of each and every folder down the file system hierarchy. The h flag shows a human readable file size.

For my home directory, I get the following output:

404M    Desktop
 30G    Documents
6.0G    Library
 32G    Movies
 18G    Music
 11G    Pictures
2.7G    Projects
 16K    Public
166M    Sites

Where things are installed to on FreeBSD

This is more of a reference post for me as I keep forgetting, or get confused with the locations used for Ubuntu.

At the moment, I’m working on setting up FreeBSD as a replacement to my Ubuntu web server in the loft. I’m using a spare PC to test the configurations on.

Description Ubuntu Freebsd
Install Extra
Start-up scripts /etc/init.d/ /etc/rc.d/ /usr/local/etc/rc.d/
Binaries /bin/ /usr/local/bin/
System binaries /sbin/ /usr/local/sbin/
System configuration files /etc/ /etc/ /usr/local/etc/
2006-02-14 []
View Comments