From 15b2331aafcb65e38021f0879a90bd45a7a1ead5 Mon Sep 17 00:00:00 2001 From: Grégoire Jadi Date: Wed, 28 Mar 2018 12:08:21 +0200 Subject: Clean empty directories once the files are removed with shred shred can only remove files. Use rm to cleanup the directories once all files have been erased. Signed-off-by: Silvio Rhatto --- lib/keyringer/functions | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/keyringer/functions b/lib/keyringer/functions index b8f91a7..72286ff 100755 --- a/lib/keyringer/functions +++ b/lib/keyringer/functions @@ -217,7 +217,8 @@ function keyringer_shred { if [ "$tool" == "wipe" ] || [ "$tool" == "rm" ] || [ "$tool" == "rm -P" ]; then $tool -rf $path else - find $path -exec $tool -uf {} \; + find $path -type f -exec $tool -uf {} \; + find -d $path -type d -exec rmdir {} \; fi else if [ "$tool" == "wipe" ] || [ "$tool" == "rm" ] || [ "$tool" == "rm -P" ]; then -- cgit v1.2.3