Skip to content

Instantly share code, notes, and snippets.

@koheisg
Created August 1, 2017 00:36
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 koheisg/5c865967108f7b68204778e8d9e42360 to your computer and use it in GitHub Desktop.
Save koheisg/5c865967108f7b68204778e8d9e42360 to your computer and use it in GitHub Desktop.
Make backup for mac
.PHONY: backup
backup:
$(eval DATE := $(shell /bin/date +'%Y%m%d'))
mkdir -p ~/backup/$(DATE)/desktop
mkdir -p ~/backup/$(DATE)/downloads
mv ~/Desktop/* ~/backup/$(DATE)/desktop
mv ~/Downloads/* ~/backup/$(DATE)/downloads
@koheisg
Copy link
Author

koheisg commented Aug 1, 2017

This file keeps ~/Desktop and ~/Downloads clean.
I might focus my task.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment