aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2022-02-11 20:58:10 +0100
committerSebastiano Tronto <sebastiano@tronto.net>2022-02-11 20:58:10 +0100
commitdde2e2618499ddf4c7644418f792113fbe19b955 (patch)
treed5465042ce09417f00b53918f9f8ad1c02570cad
parentbb87698ceeb625b641308e3ef48dc66b29d0f1b1 (diff)
downloadscripts-dde2e2618499ddf4c7644418f792113fbe19b955.tar.gz
scripts-dde2e2618499ddf4c7644418f792113fbe19b955.zip
Added -f option to trash empty, added little security check
Diffstat (limited to '')
-rwxr-xr-xtrash5
1 files changed, 4 insertions, 1 deletions
diff --git a/trash b/trash
index 28aa775..a9f6fb1 100755
--- a/trash
+++ b/trash
@@ -13,7 +13,10 @@ if [ -z "$1" ]; then
13else 13else
14case "$1" in 14case "$1" in
15 empty) 15 empty)
16 rm -r $trashfolder/* 16 # little check
17 if [ -n "$trashfolder" ]; then
18 rm -rf $trashfolder/*
19 fi
17 ;; 20 ;;
18 ls) 21 ls)
19 ls $trashfolder 22 ls $trashfolder

Generated with cgit - Back to sebastiano.tronto.net