progress
This commit is contained in:
parent
2416a5a77e
commit
c09d4c7590
@ -1 +1 @@
|
||||
0.9.5
|
||||
0.9.6
|
||||
|
||||
@ -20,18 +20,27 @@ Settings[PruneDate]=$(date -d "${Days} days ago" '+%Y-%m-%d')
|
||||
src=${Settings[Src]}
|
||||
prune_date=${Settings[PruneDate]}
|
||||
|
||||
echo Before Pruning....
|
||||
duf ${src}
|
||||
|
||||
echo "Finding files older than ${prune_date}..."
|
||||
Cmd="find ${src} -type f ! -newermt \"${prune_date}\""
|
||||
echo ${Cmd}
|
||||
files=($(eval ${Cmd}))
|
||||
total_files= ${#files[*]}
|
||||
|
||||
if [[ ${total} == 0 ]]
|
||||
then
|
||||
echo "No files found to be pruned. Bye..."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo Before Pruning....
|
||||
duf ${src}
|
||||
|
||||
echo "The following files will be removed:"
|
||||
echo "===================================="
|
||||
for f in $files ; do echo $f; done
|
||||
echo "===================================="
|
||||
echo "Total files to be pruned: ${#files[*]}"
|
||||
echo "Total files to be pruned: ${total_files}"
|
||||
|
||||
Cmd="${Cmd} -delete"
|
||||
echo ${Cmd}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user