Archive for August, 2007

File and disk space usage report on Linux

August 26, 2007

Linux has very useful commands but usually they need some extra parameters to read the output easily. du and df are among these. du reports the file and directory usage. It is the command to find about the size of a directory and its sub-folders. Here it is how I use it:

du --block-size=1M --exclude='./.*' --max-depth=1 |sort -n

and the output,


--block-size gives the file size in 1 megabyte blocks, --exclude='./.*' does not select the files&folders provided by the pattern which is hidden files&folders and --max-depth=1 shows only the directories. After these options I sort the output so that it lists by ascending according to directory size. The last number 7107 is the total size of my home directory in megabytes except the hidden folders&files. You can put this command as duu into alias list by typing

echo alias duu='du --block-size=1M --exclude='./.*' --max-depth=1 |sort -n' >> ~/.bashrc

df is similar but for file systems. You can check the home and root folder usage easily:

df -h


-h parameter is for human readable output. It provides the total usage in mega or gigabytes. Otherwise numbers are in bytes which is hard to read.


Presentations with Latex (PROSPER Class)

August 13, 2007

On Kubuntu 7.04 I did the following steps to install prosper class for Latex:

Download seminar and prosper to your home directory,


download prosper-1.00.4.tar.gz and contrib-prosper-1.0.0.tar.gz from


sudo apt-get install kile
sudo mkdir -p /usr/local/share/texmf/tex/latex/
cd /usr/local/share/texmf/tex/latex/
sudo unzip ~/
sudo tar -zxvf ~/prosper-1.00.4.tar.gz
sudo tar -C prosper/ -zxvf ~/contrib-prosper-1.0.0.tar.gz
sudo texhash

It’s ready to use. You may want to take a look at for usage. Kile is an excellent GUI&editor for Latex.