August 29, 2009

Count unique IP address in Apache’s access log

Filed under: Bash, How To, Linux, Ubuntu — James @ 11:14 pm
sed < /var/log/httpd/webtop.access_log -e 's/ .*$//' | sort | uniq -c

November 16, 2008

List files/folders ordered by size

Filed under: Bash, How To, Linux — James @ 11:13 am
du -s * | sort -n

November 11, 2008

Bash script to retry failed command

Filed under: Bash, Programming — James @ 2:09 pm

This was originally developed to retry an rsync command if a network error happened. It’s a mishmash of code found from around the net, and could probably be tidier but it gets the job done.

(more…)