Created
January 21, 2019 08:28
-
-
Save yuan3y/bf9a45aa27ea354b55a8b535c65ab6a5 to your computer and use it in GitHub Desktop.
create folders for the current month under ~/Downloads/YYYY/MM and softlink personal to ~/Downloads/personal/YYYY/MM
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash -x | |
YYYYslashMM=$(date +%Y/%m) | |
cd ~/Downloads | |
mkdir -pv ./$YYYYslashMM | |
rm current | |
ln -s $YYYYslashMM/ current | |
mkdir -pv ./personal/$YYYYslashMM | |
cd ./$YYYYslashMM | |
rm personal | |
ln -s ../../personal/$YYYYslashMM/ personal | |
echo finish creating "$YYYYslashMM" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment