Produce a sorted list of recently changed files by running this:
find . -type f -printf '%TY-%Tm-%Td %TT %p\n' | sort
Category: "Documentation"
My new box has arrived, and I've started building it up with the next LTS version of Ubuntu (not actually due for release till April). I've installed with hcmc admin logon only, added gnome-shell, and started adding applications. I'll keep hacking at this till 12.04 seems pretty stable, and then switch from my old machine by moving HDs to the new one. In the meantime, there's a lot of testing to do.
Working with RVDB in Belgium, I've been helping to investigate problems building and running the eXist WAR distro (trunk) on Windows. It appears to be the case that the WAR distro does not run correctly on Windows unless an additional stax jar file is added (this jar was recently removed from trunk, as it was thought to be unnecessary). We have now clarified and confirmed the symptoms and solution, and RVDB wil make a detailed bug report. We don't run eXist under Windows ourselves, but 70% of eXist downloads came from Windows users over the last few years, so it's important that the upcoming new version work well on Windows.
Not as easy as you'd think. There are a couple of easy ways to find out who's logged in to a linux machine: 'users' and 'who'. But I've discovered that when a user has been authenticated via ldap they don't show up when 'users' and 'who' are called. This MAY be a result of my configuration of the machine, but until that is determined, the only I've found of doing this is a bit convoluted. Run this one-liner when logged in to a remote machine:
me=`whoami`;today=`date +"%a %b %d"`;last|sort -r|grep "$today"|grep -v "$me"|grep -v reboot|cut -d " " -f1
Explanation
me=`whoami` -> we want to able to exclude ourselves from the output.
today=`date +"%a %b %d"` -> we need the current date, without the time
last -> the actual command we need to find users logged in with ldap
sort -r -> last outputs oldest last, this reverses the order
grep $today -> cleans up our output to only show stuff from today
grep -v "$me" -> exclude me from output
grep -v reboot -> exclude the last reboot command
cut -d " " -f1 -> get the first field of the output (this is the login name of the ldap user)
All of that and all you *really* get is the last logged in user. They may or may not actually be logged in right now.
I'll have to look in to my ldap config a bit more closely. There must be a way of including ldap auth'd users in the output from 'users' or 'who'.
NOTE: a simpler, possibly just-as-useful, method is to run this
last | grep 'still logged in' | grep 'tty' | cut -d " " -f 1
which returns the logged user running on a local display.
To turn on directory indexing, add this to your .htaccess file:
Options +Indexes
The additional setting for fancy indexing doesn't seem to work on our servers:
IndexOptions +FancyIndexing
I've had to figure this out three times now, so I'm blogging it.
- Install the Lightning add-on for Thunderbird.
- Install the Provider for Microsoft Exchange add-on.
- Click on the Calendar view, and right-click under Home. Choose New Calendar.
- Select "On the network", then Next, and choose Microsoft Exchange.
- This is the unintuitive bit: in Location, put this:
https://UVIC%5Cnetlink@auto/
Replace "netlink" with your netlink id. - When asked to log in, use "UVIC\netlink" as your login id.
Running across this reminded me that I've been meaning to set up ssh keys for rsync to Rutabaga for ages now, and not got around to it, so I've just done it, and built a single backup script for all current projects which doesn't require passwords.
We intend this as the first stage in implementing a script which can refresh a large db collection based on document dates, so only documents changed since the last-modified date are uploaded (perhaps after allowing a 24-hour cushion):
xquery version "1.0"; declare namespace local="http://hcmc.uvic.ca/ns"; declare namespace exist="http://exist.sourceforge.net/NS/exist"; declare namespace xmldb="http://exist-db.org/xquery/xmldb"; import module namespace request="http://exist-db.org/xquery/request"; declare variable $inCol := request:get-parameter("col", "/db"); declare variable $startCol := if (starts-with($inCol, "/")) then $inCol else concat("/", $inCol); declare function local:getLatest($col as xs:string) as xs:dateTime* { let $dates :=local:getDocDates($col) return max($dates) }; declare function local:getDocDates($col as xs:string) as xs:dateTime* { let $result := (for $c in xmldb:get-child-collections($col) return local:getDocDates(concat($col, '/', $c)), for $r in xmldb:get-child-resources($col) return xmldb:last-modified($col, $r) ) return $result }; local:getLatest($startCol)UPDATE: the next step is ready. See this post: http://hcmc.uvic.ca/blogs/index.php?blog=11&p=8962
Because I keep forgetting it:
find -name "\.svn" -exec rm -rf {} \;
The Oracle version of Java will no longer be available through repos and must be manually installed. Here's how I did it.
1) Download the latest JDK from here: http://www.oracle.com/technetwork/java/javase/downloads/
2) Unpack the jdk (right now it unpacks as a directory called jdk1.7.0_02) and unpack it in to the /usr/lib/jvm/ directory.
3) construct a text file called /usr/lib/jvm/.jdk1.7.0_02.jinfo and put this in it:
name=jdk1.7.0_02 alias=jdk1.7.0_02 priority=1051 section=main hl java /usr/lib/jvm/jdk1.7.0_02/jre/bin/java hl keytool /usr/lib/jvm/jdk1.7.0_02/jre/bin/keytool hl pack200 /usr/lib/jvm/jdk1.7.0_02/jre/bin/pack200 hl rmid /usr/lib/jvm/jdk1.7.0_02/jre/bin/rmid hl rmiregistry /usr/lib/jvm/jdk1.7.0_02/jre/bin/rmiregistry hl unpack200 /usr/lib/jvm/jdk1.7.0_02/jre/bin/unpack200 hl orbd /usr/lib/jvm/jdk1.7.0_02/jre/bin/orbd hl servertool /usr/lib/jvm/jdk1.7.0_02/jre/bin/servertool hl tnameserv /usr/lib/jvm/jdk1.7.0_02/jre/bin/tnameserv hl jexec /usr/lib/jvm/jdk1.7.0_02/jre/lib/jexec jre policytool /usr/lib/jvm/jdk1.7.0_02/jre/bin/policytool jdk appletviewer /usr/lib/jvm/jdk1.7.0_02/bin/appletviewer jdk apt /usr/lib/jvm/jdk1.7.0_02/bin/apt jdk extcheck /usr/lib/jvm/jdk1.7.0_02/bin/extcheck jdk idlj /usr/lib/jvm/jdk1.7.0_02/bin/idlj jdk jar /usr/lib/jvm/jdk1.7.0_02/bin/jar jdk jarsigner /usr/lib/jvm/jdk1.7.0_02/bin/jarsigner jdk javac /usr/lib/jvm/jdk1.7.0_02/bin/javac jdk javadoc /usr/lib/jvm/jdk1.7.0_02/bin/javadoc jdk javah /usr/lib/jvm/jdk1.7.0_02/bin/javah jdk javap /usr/lib/jvm/jdk1.7.0_02/bin/javap jdk jconsole /usr/lib/jvm/jdk1.7.0_02/bin/jconsole jdk jdb /usr/lib/jvm/jdk1.7.0_02/bin/jdb jdk jhat /usr/lib/jvm/jdk1.7.0_02/bin/jhat jdk jinfo /usr/lib/jvm/jdk1.7.0_02/bin/jinfo jdk jmap /usr/lib/jvm/jdk1.7.0_02/bin/jmap jdk jps /usr/lib/jvm/jdk1.7.0_02/bin/jps jdk jrunscript /usr/lib/jvm/jdk1.7.0_02/bin/jrunscript jdk jsadebugd /usr/lib/jvm/jdk1.7.0_02/bin/jsadebugd jdk jstack /usr/lib/jvm/jdk1.7.0_02/bin/jstack jdk jstat /usr/lib/jvm/jdk1.7.0_02/bin/jstat jdk jstatd /usr/lib/jvm/jdk1.7.0_02/bin/jstatd jdk native2ascii /usr/lib/jvm/jdk1.7.0_02/bin/native2ascii jdk rmic /usr/lib/jvm/jdk1.7.0_02/bin/rmic jdk schemagen /usr/lib/jvm/jdk1.7.0_02/bin/schemagen jdk serialver /usr/lib/jvm/jdk1.7.0_02/bin/serialver jdk wsgen /usr/lib/jvm/jdk1.7.0_02/bin/wsgen jdk wsimport /usr/lib/jvm/jdk1.7.0_02/bin/wsimport jdk xjc /usr/lib/jvm/jdk1.7.0_02/bin/xjc plugin -javaplugin.so /usr/lib/jvm/jdk1.7.0_02/jre/lib/amd64/libjavaplugin_jni.so
4) run "sudo update-alternatives --config java" and choose jdk1.7.0_02
5) check that it's your current java by running "java -version" - you should get something like this back:
java version "1.7.0_02"
Java(TM) SE Runtime Environment (build 1.7.0_02-b13)
Java HotSpot(TM) 64-Bit Server VM (build 22.0-b10, mixed mode)