X-Git-Url: https://www.fleuret.org/cgi-bin/gitweb/gitweb.cgi?p=scripts.git;a=blobdiff_plain;f=trash.sh;h=550b57429f24dd57b8aed10f8c800468d511f265;hp=966af6ead695d3857055283d257f6031371fc4c8;hb=4ec5d5f4a0a407340f44e06e5b187053782a0470;hpb=e3d361eca6d0d08898beaaf177e2bfc8c839980c diff --git a/trash.sh b/trash.sh index 966af6e..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,7 +32,4 @@ else echo "Created ${TRASH}:" fi -mv $* ${TRASH} - -ls -ad ${TRASH}/* - +mv "$@" ${TRASH}