Categories
OS tricks

Cleanup directory

So we started running Maven snapshots at a fairly regular basis to enable automatic running of Watir tests. This fills up the disk really fast so I had to do some research to fine a linux command that would delete all but the newest snapshot from multiple projects:

find /var/www/maven2-snapshots -type d -path '*SNAPSHOT' | xargs -i bash -c "find {} -type f -not -path '*maven-metadata*' | grep projectname | sort -r | awk 'NR>6'"

The above command will keep everything that is called maven-metadata something and the 6 latest files in the directory (Maven generates 6 files for each snapshot).

Categories
OS tricks

Java on Debian

I need this tutorial next time. 🙂

Categories
Development OS tricks

Oracle XE on Linux

I’m not a big fan of Oracle. I’ve had my fair share of problems with their products, but I’ve mentioned before that I think they’re on the right track. As one example you now got deb packages for Oracle Express Edition. Check out a tutorial here.

Update: Another blog that also includes some details about environment and user creation here.