home

Quickies, by Andrea Olivato

text

Du sort by size and human readable

Quick example to improve the du command output by displaying the biggest 10 subfolder of the current folder, each with its human redable size.

	
du -k * | sort -nr | cut -f2 | xargs -d '\n' du -sh | head -n 10

Found on ubuntu forums

2 months ago

December 7, 2011
Comments (View)
text

Reinstall all currently installed packages from apt

This script, found on ubuntu forums, might help if you rm -rf some important dir and want to repair everything. Obviously it never happened to me.

for pkg in `dpkg --get-selections | awk '{print $1}' | egrep -v '(dpkg|apt|mysql|mythtv)'` ; do apt-get -y --force-yes install --reinstall $pkg ; done

2 years ago

July 21, 2009
Comments (View)