Index: /branches/eam_branches/ipp-20130711/Ohana/src/opihi/dvo/hosts.c
===================================================================
--- /branches/eam_branches/ipp-20130711/Ohana/src/opihi/dvo/hosts.c	(revision 35877)
+++ /branches/eam_branches/ipp-20130711/Ohana/src/opihi/dvo/hosts.c	(revision 35878)
@@ -12,5 +12,5 @@
     gprint (GP_ERR, "  commands:\n");
     gprint (GP_ERR, "    purge-temp : delete all tempfiles for this shell\n");
-    gprint (GP_ERR, "               : [-old-pid] [-all-pid] [-v] [-verbose] [-commit] [-type type]\n");
+    gprint (GP_ERR, "               : [-old-pid] [-all-pid] [-v] [-verbose] [-commit] [-type type] [-age hours]\n");
     gprint (GP_ERR, "    get-results : determine name of RESULTS file\n");
     return FALSE;
@@ -33,4 +33,15 @@
     }
     
+    struct timeval now;
+    gettimeofday (&now, NULL);
+
+    float AGE = 0;
+    int NOW = now.tv_sec;
+    if ((N = get_argument (argc, argv, "-age"))) {
+      remove_argument (N, &argc, argv);
+      AGE = atof(argv[N]);
+      remove_argument (N, &argc, argv);
+    }
+
     int VERBOSE = FALSE;
     if ((N = get_argument (argc, argv, "-v"))) {
@@ -121,5 +132,14 @@
       glob (name, 0, NULL, &pglob);
       int j;
+      struct stat filestats;
       for (j = 0; j < pglob.gl_pathc; j++) {
+	if (AGE > 0) {
+	  if (stat(pglob.gl_pathv[j], &filestats)) {
+	    gprint (GP_ERR, "failed to get stats for %s\n", pglob.gl_pathv[j]);
+	    continue;
+	  }
+	  float myAge = (NOW - filestats.st_mtime) / 3600.0;
+	  if (myAge < AGE) continue;
+	}
 	if (VERBOSE) gprint (GP_ERR, "unlink %s\n", pglob.gl_pathv[j]);
 	if (!DRYRUN) unlink (pglob.gl_pathv[j]);
