Someone asked me why the df (Disk Free) command in Mandrake 9.2 outputs such hard to read information.

In Mandrake 9.2 the df command now shows the long partition information for your harddrives. It is very hard to read /dev/ide/host0/bus0/target0/lun0/part5 so I assigned an alias to it so that is shows as /dev/hda5.

Add this alias to your ~/.bashrc file to shorten the partition names
alias df='df -Ph | sed s/"dev\/ide\/host0\/bus0\/target0\/lun0\/part"/"dev\/hda"/g'

This only works for hda partitions, sorry. It would be easy for someone to write a short bash script to do this simple text replace for any partition but I don't have time.

Another way to do this, kdf comes with KDE and is a very nice graphical program. I use df in many scripts where a graphic program will not work. You could also look on http://freshmeat.net for more programs to show disk free space.

Other commands to try.
du (Disk Usage) is used to show how much space is used in a given directory.

Try these commands in your home directory.
du -hs .
du -hs ./*


Roy Souther
www.SiliconTao.com


Changing the way people do business.


Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
clug-talk mailing list
[EMAIL PROTECTED]
http://clug.ca/mailman/listinfo/clug-talk_clug.ca

Reply via email to