progress
This commit is contained in:
parent
2416a5a77e
commit
108ae35a06
@ -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]}
|
src=${Settings[Src]}
|
||||||
prune_date=${Settings[PruneDate]}
|
prune_date=${Settings[PruneDate]}
|
||||||
|
|
||||||
echo Before Pruning....
|
|
||||||
duf ${src}
|
|
||||||
|
|
||||||
echo "Finding files older than ${prune_date}..."
|
echo "Finding files older than ${prune_date}..."
|
||||||
Cmd="find ${src} -type f ! -newermt \"${prune_date}\""
|
Cmd="find ${src} -type f ! -newermt \"${prune_date}\""
|
||||||
echo ${Cmd}
|
echo ${Cmd}
|
||||||
files=($(eval ${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 "The following files will be removed:"
|
||||||
echo "===================================="
|
echo "===================================="
|
||||||
for f in $files ; do echo $f; done
|
for f in $files ; do echo $f; done
|
||||||
echo "===================================="
|
echo "===================================="
|
||||||
echo "Total files to be pruned: ${#files[*]}"
|
echo "Total files to be pruned: ${total_files}"
|
||||||
|
|
||||||
Cmd="${Cmd} -delete"
|
Cmd="${Cmd} -delete"
|
||||||
echo ${Cmd}
|
echo ${Cmd}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user