From 5478639ff245e16bec18fa6e5313703816d65cf4 Mon Sep 17 00:00:00 2001 From: SanJacobs Date: Sat, 8 Oct 2022 16:01:56 +0200 Subject: Planning things out --- send-refresh.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'send-refresh.sh') diff --git a/send-refresh.sh b/send-refresh.sh index d57647f..371b596 100644 --- a/send-refresh.sh +++ b/send-refresh.sh @@ -1,8 +1,7 @@ #!/bin/bash -# Recursively delete directories by age (14 days) -find /path/to/base/dir/* -type d -ctime +14 -exec rm -rf {} \; - +# Recursively delete directories by age (14 days), and only exactly at the depth of the base directory +find /path/to/base/dir/* -type d -mindepth 1 -maxdepth 1 -ctime +14 -exec rm -rf {} \; -- cgit v1.2.1