Created
July 15, 2016 18:08
-
-
Save oleksiyp/2c88f8b07544e303c791455581fb29a3 to your computer and use it in GitHub Desktop.
Deduplicate and orgranize directories by date
This file contains 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
find . -type f -print0 | \ | |
while IFS='' read -r -d '' x; do | |
d=$(date -r "$x" +%Y-%m-%d) | |
mkdir -p "$d" | |
mv -f "$x" "$d/" | |
done | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment