]> oss.titaniummirror.com Git - ovzbpc.git/commitdiff
bpcdump: simplify method for finding oldest backup on esata drive.
authorsmckown <smckown@986fd584-583e-0410-b54d-b9fe63dff8e5>
Fri, 16 Oct 2009 13:57:02 +0000 (13:57 +0000)
committerR. Steve McKown <rsmckown@gmail.com>
Wed, 16 Dec 2009 17:23:08 +0000 (10:23 -0700)
bpcdump

diff --git a/bpcdump b/bpcdump
index 19644aca579300bc0a2be3df5cd4568fccbef14e..fff636ab3e0bc119075185a75faee3b1535d418a 100755 (executable)
--- a/bpcdump
+++ b/bpcdump
@@ -150,8 +150,7 @@ fi
 dstblks=$(df -P "$EXTFS" | grep "$EXTFS" | awk '{ print $4 }')
 while [ $dstblks -le $srcblks ]; do
     info "Only $dstblks free on $EXTFS"
-    oldest=$(cd $EXTFS && eval ls -ltd "ve${VEID}*" 2>/dev/null | tail -1 | \
-       awk '{ print $8 }')
+    oldest=$(cd $EXTFS && eval ls -td "ve${VEID}*" 2>/dev/null | tail -1)
     if [ -d "$EXTFS/$oldest" ]; then
        info "Removing old backup $oldest from $EXTFS"
        rm -rf "$EXTFS/$oldest"