From: Edward Delaporte Date: Tue, 16 Jun 2026 22:39:32 +0000 (-0500) Subject: Add command to archive files in Downloads X-Git-Url: https://us-delaporte.pagekite.me/gitweb/down-shift.git/commitdiff_plain/319f671519c61fb9b3116074ef4fe7a859d11bf6?ds=inline Add command to archive files in Downloads --- 319f671519c61fb9b3116074ef4fe7a859d11bf6 diff --git a/downboy b/downboy new file mode 100755 index 0000000..9f46946 --- /dev/null +++ b/downboy @@ -0,0 +1,7 @@ +#!/usr/bin/bash +# Moves downloads older than 30 days into '~/Downloads/archived-MM' +fname=$(printf "$HOME/Downloads/archived-%02d" $(date +%m)) +echo $fname +mkdir -p $fname +find "$HOME/Downloads" -maxdepth 1 -type f -mtime +30 -exec mv {} $fname \; +find "$HOME/Downloads" -maxdepth 1 -type d -mtime +30 -exec mv {} $fname \;