From 23c39ee19f03f2bca20fc509a03733a43677e501 Mon Sep 17 00:00:00 2001 From: Yonghee Han Date: Fri, 26 May 2017 11:30:57 +0900 Subject: [PATCH] Do not remove the Base snapshots on policy find : -not -regex .*-base.* Change-Id: I553e630832ddf4f1c21e4d9c2d8692b0bfbcf52f --- dir-purge-tool.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dir-purge-tool.sh b/dir-purge-tool.sh index e5d8f5e..328ea92 100755 --- a/dir-purge-tool.sh +++ b/dir-purge-tool.sh @@ -6,7 +6,7 @@ remove_old() { path=$1 maxage=$(($2 * 86400)) -dirlist=`find $path -type d -regextype posix-awk -regex $PURGE_PATTERN` +dirlist=`find $path -type d -regextype posix-awk -regex $PURGE_PATTERN -not -regex '.*-base.*' now=`date +"%s"` for dir in $dirlist; do dirn=`dirname $dir` -- 2.7.4