Skip to content

Instantly share code, notes, and snippets.

@yehosef yehosef/date_dirs.sh
Last active Aug 29, 2015

Embed
What would you like to do?
organized files by date
#!/bin/bash
years=`seq 2014 2015`
months=`seq -w 01 12`
for year in ${years[@]}; do
mkdir $year
for month in ${months[@]}; do
mkdir $year/$month
mv $year-$month-* $year/$month
done
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.