Skip to content

Instantly share code, notes, and snippets.

@kmmbvnr
Created October 18, 2016 07:19
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 kmmbvnr/0c55b60c6383117d1eae17a3a4432174 to your computer and use it in GitHub Desktop.
Save kmmbvnr/0c55b60c6383117d1eae17a3a4432174 to your computer and use it in GitHub Desktop.
#!/bin/bash
DWDIR=~/Downloads/`date +%Y-%m-%d`
if [ ! -d $DWDIR ]; then
cd ~/Downloads/ && find -maxdepth 1 -type d -empty -delete
mkdir $DWDIR
unlink ~/Downloads/Current
ln -sf $DWDIR ~/Downloads/Current
fi;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment