From 9e4758388321cf5e39e524af5672b8a6f606b10f Mon Sep 17 00:00:00 2001 From: Djan <> Date: Tue, 28 Sep 2021 13:53:20 +0200 Subject: [PATCH] adding 2 functions : bobalstimes and bobainfotail bobalstimes : list all archives with time creation bobainfotail : list infos about the 5 last archives --- borgaliasandfunctions.txt | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/borgaliasandfunctions.txt b/borgaliasandfunctions.txt index e82874d..a801706 100644 --- a/borgaliasandfunctions.txt +++ b/borgaliasandfunctions.txt @@ -104,11 +104,14 @@ function bobals { TestBorgRepo if [ "$TestBorgErr" = "1" ]; then return;fi - if [ "$1" != "" ]; then - borg list --short .::$1 - else borg list --short ./ - fi +} + +function bobalstimes { + TestBorgRepo + if [ "$TestBorgErr" = "1" ]; then return;fi + + borg list --format {barchive}{SPACE}{SPACE}{TAB}{start}{NL} ./ } function bobagrepls { @@ -140,6 +143,17 @@ function bobainfolast { borg info .::$archive } +function bobainfotail { + TestBorgRepo + if [ "$TestBorgErr" = "1" ]; then return;fi + + for archive in $(borg list --short ./ | tail -n 5);do + echo "----------------------------------------------------" + borg info .::$archive + echo "----------------------------------------------------" + done +} + function bobainfoall { TestBorgRepo if [ "$TestBorgErr" = "1" ]; then return;fi