func destroy

This commit is contained in:
TheK4n 2022-04-21 16:11:06 +03:00
parent fbe1ac82f1
commit af8a58b13f

View File

@ -4,7 +4,7 @@ destroy() {
test -n "$1" || return 1 test -n "$1" || return 1
test -e "$1" || return 1 test -e "$1" || return 1
echo "Sure want to destroy file '$1' with size $(du -hs "$1" | awk '{printf $1}') [y/N] " echo -n "Sure want to destroy file '$1' with size $(du -hs "$1" | awk '{printf $1}') [y/N] "
read -r response read -r response
[[ $response == [yY] ]] && shred -zun 25 "$1" [[ $response == [yY] ]] && shred -zun 25 "$1"
} }