From 55a582b6836336dd955b3ea302d1f85f9e922aae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?marc=20W=C3=A4ckerlin?= Date: Mon, 9 Oct 2017 11:11:20 +0200 Subject: [PATCH] fix show delete list in dry run mode --- btrfs-snapshots.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/btrfs-snapshots.sh b/btrfs-snapshots.sh index eaac4c9..d1daeda 100755 --- a/btrfs-snapshots.sh +++ b/btrfs-snapshots.sh @@ -110,7 +110,7 @@ for fs in ${BTRFS_VOLUMES}; do echo " " mount "$device" "$TMP_MNT" echo " " btrfs subvolume snapshot "${TMP_MNT}${subvol}" "${TMP_MNT}${target}${date}" if test -n "$del"; then - for f in $(ls -1 "${TMP_MNT}${target}${date}"-* | tail -n +"$del"); do + for f in $(ls -1 "${TMP_MNT}${target}"-* | tail -n +"$del"); do echo " " btrfs subvolume delete "$f" done fi @@ -118,7 +118,7 @@ for fs in ${BTRFS_VOLUMES}; do else sudo btrfs subvolume snapshot "${TMP_MNT}${subvol}" "${TMP_MNT}${target}${date}" #if test -n "$del"; then - # for f in $(ls -1 "${TMP_MNT}${target}${date}"-* | tail -n +"$del"); do + # for f in $(ls -1 "${TMP_MNT}${target}"-* | tail -n +"$del"); do # sudo btrfs subvolume delete "$f" # done #fi