mybin

my ~/bin
git clone https://a3nm.net/git/mybin/
Log | Files | Refs | README

commit 803607c5e9ac869ff4fe65a10f06ad5a52fd7a68
parent 75bdddb6efb00ce36cbbc258b8059c7e4579c758
Author: Antoine Amarilli <a3nm@a3nm.net>
Date:   Wed, 21 Nov 2018 18:25:48 +0100

Merge branch 'master' of a3nm.net:git/mybin

Diffstat:
hierarchive | 6+++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/hierarchive b/hierarchive @@ -13,7 +13,11 @@ NDAYS="7" D=$(date '+%Y-%m-%d') F="$2/$D" -mkdir "$F" +#mkdir "$F" cd "$1" +# find all old files and move them away find -type f -mtime +$NDAYS -print0 | xargs -r -0 -n 1 ./hierarchive_file "$F" +# now, recursively remove all empty directories +find . -type d | xargs rmdir -p 2>/dev/null +