X-Git-Url: https://www.fleuret.org/cgi-bin/gitweb/gitweb.cgi?p=scripts.git;a=blobdiff_plain;f=trash.sh;h=550b57429f24dd57b8aed10f8c800468d511f265;hp=aaef03792741bfa3d64c8bfa2c7cc5952c2021af;hb=4ec5d5f4a0a407340f44e06e5b187053782a0470;hpb=ea923a43955b6b07ebe087eef413dc27744d8c81 diff --git a/trash.sh b/trash.sh index aaef037..550b574 100755 --- a/trash.sh +++ b/trash.sh @@ -22,7 +22,7 @@ set -e # Move things to a newly created trash directory in /tmp/. Re-use an # existing one if it is less than 5min old. -TRASH=$(find /tmp/ -maxdepth 1 -mmin -5 -type d -name "trash*" | sort | tail -1) +TRASH=$(find /tmp/ -maxdepth 1 -mmin -15 -type d -name "trash*" | sort | tail -1) if [[ ${TRASH} ]]; then echo "Re-use ${TRASH}" @@ -32,6 +32,4 @@ else echo "Created ${TRASH}:" fi -mv $* ${TRASH} - -# ls -ad ${TRASH}/* +mv "$@" ${TRASH}