Wednesday, August 6, 2008

Disk Space Commands of Linux..

df -h show list of partitions mounted
ls -lSr |more show size of the files and directories ordered by size
du -sh dir1 estimate space used by directory 'dir1'
du -sk * | sort -rn show size of the files and directories sorted by size
rpm -q -a --qf '%10{SIZE}t%{NAME}n' | sort -k1,1n show space used by rpm packages installed sorted by size (fedora, redhat and like)
dpkg-query -W -f='${Installed-Size;10}t${Package}n' | sort -k1,1n show space used by deb packages installed sorted by size (ubuntu, debian and like)

Comment here.

No comments: