You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by ea...@apache.org on 2015/04/16 20:48:33 UTC

svn commit: r1674135 - /uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/uima-ducc-vm/cron/cleanup.sh

Author: eae
Date: Thu Apr 16 18:48:32 2015
New Revision: 1674135

URL: http://svn.apache.org/r1674135
Log:
always keep 2 days of logfiles

Modified:
    uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/uima-ducc-vm/cron/cleanup.sh

Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/uima-ducc-vm/cron/cleanup.sh
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/uima-ducc-vm/cron/cleanup.sh?rev=1674135&r1=1674134&r2=1674135&view=diff
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/uima-ducc-vm/cron/cleanup.sh (original)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-examples/src/main/uima-ducc-vm/cron/cleanup.sh Thu Apr 16 18:48:32 2015
@@ -18,7 +18,19 @@
 # under the License.
 # -----------------------------------------------------------------------
 
-for f in `find /tmp -maxdepth 1 -mtime +7`; do rm -rf $f; done
-mkdir /tmp/degenaro
-mkdir /tmp/degenaro/ducc
-mkdir /tmp/degenaro/ducc/logs
\ No newline at end of file
+# this section reports what the script will remove
+togo=`find /tmp/degenaro/ducc/logs/ -maxdepth 1 -name "[0-9]*"  -mtime +2 | wc -l`
+echo Removing $togo directories in /tmp/degenaro/ducc/logs/
+find /tmp/degenaro/ducc/logs/ -maxdepth 1 -name "[0-9]*"  -mtime +2 | xargs -i ls -ld {}
+togo=`find /home/degenaro/ducc/logs/ -maxdepth 1 -name "[0-9]*"  -mtime +2 | wc -l`
+echo Removing $togo directories in /home/degenaro/ducc/logs/
+find /home/degenaro/ducc/logs/ -maxdepth 1 -name "[0-9]*"  -mtime +2 | xargs -i ls -ld {}
+togo=`find /tmp/ducc/driver/ -maxdepth 4 -name "[0-9]*"  -mtime +1 | wc -l`
+echo Removing $togo directories in /tmp/ducc/driver/
+find /tmp/ducc/driver/ -maxdepth 4 -name "[0-9]*"  -mtime +1 | xargs -i ls -ld {}
+
+
+# this section actually removes stuff
+find /tmp/degenaro/ducc/logs/ -maxdepth 1 -name "[0-9]*"  -mtime +2 | xargs -i rm -rf {}
+find /home/degenaro/ducc/logs/ -maxdepth 1 -name "[0-9]*"  -mtime +2 | xargs -i rm -rf {}
+find /tmp/ducc/driver/ -maxdepth 4 -name "[0-9]*"  -mtime +1 | xargs -i rm -rf {}
\ No newline at end of file