May 27, 2010

Recursively find the latest modified file

Filed under: Bash,Linux — James @ 10:10 am

find . -printf "%CY-%Cm-%Cd %CH:%CM:%CS\t%p\n" | sort -nr | head -n 1

March 3, 2010

DynDNS Lite!

Filed under: How To,Linux,Ubuntu — James @ 10:47 pm

As my IP address changes so rarely, my Dynamic DNS accounts keep expiring before the IP changes!
(more…)

December 16, 2009

Digikam in Ubuntu 9.10

Filed under: How To,Linux,Ubuntu — Tags: , — James @ 10:34 pm

After installing Digikam on Ubuntu, I had no video thumbnails or ability to play video.
(more…)

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/access_log -e 's/ .*$//' | sort | uniq -c

May 26, 2009

Ubuntu – Purge configuration files for removed packages

Filed under: How To,Linux,Ubuntu — James @ 11:24 am

This bash command will remove the left over config files from old packages that were removed with “apt-get remove”.

dpkg -l | awk '/^rc/ {print $2}' | xargs sudo dpkg --purge

See the source article for an explanation of how it works.

February 5, 2009

SD card and Arduino

Filed under: Arduino,Electronics,How To,Linux — James @ 8:23 pm

So, I have not long had my Arduino development board, my first project was to try and get it to log data to an SD card. This will be essential for a few future projects I have in mind. The internal EEPROM is only 512bytes, so not particularly useful for logging large amounts of data.

(more…)

November 16, 2008

List files/folders ordered by size

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

April 2, 2008

SSH: Unknown option -t

Filed under: Linux — James @ 6:24 pm

Unable to establish an SSH connection to a server, I had to log in locally. I attempted to restart the ssh service but was presented with:

sshd: OpenSSH_4.3p2 on i686-pc-linux-gnu
Unknown option -t

(more…)