From 1e5bc85e480e3bc8e8b4bbdb3d60e4538a08d411 Mon Sep 17 00:00:00 2001 From: Captain ALM Date: Fri, 30 Aug 2024 13:35:39 +0100 Subject: [PATCH] Add a list backups script. --- backup-image/list.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 backup-image/list.sh diff --git a/backup-image/list.sh b/backup-image/list.sh new file mode 100755 index 0000000..78bb057 --- /dev/null +++ b/backup-image/list.sh @@ -0,0 +1,17 @@ +#/bin/bash +if [ $# -eq 0 ]; then + echo "Usage: list.sh [Storage disk root path]"; + exit 2; +fi +ssrc=""; +if [ -z $1 ]; then + ssrc="/mnt"; +else + ssrc="$1"; +fi +for cf in $ssrc/tabls/*; do + if [ -e "$cf" ] && [ -f "$cf" ]; then + echo $(basename "$cf" ".tbl"); + fi +done +exit 0;