Skip to content

Instantly share code, notes, and snippets.

@hugows
Created November 18, 2019 16:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hugows/e26a6a5d6d45afd69e9b531e1a817c8a to your computer and use it in GitHub Desktop.
Save hugows/e26a6a5d6d45afd69e9b531e1a817c8a to your computer and use it in GitHub Desktop.
#!/bin/bash
# Script should be run daily to move Downloads/ files to an archived folder.
HOME="/home/hugo"
YESTERDAY=$(date -d "yesterday 13:00" '+%Y-%m-%d')
mkdir -p $HOME/ArchivedDownloads/$YESTERDAY
mv $HOME/Downloads/* $HOME/ArchivedDownloads/$YESTERDAY
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment