Created
December 25, 2012 16:48
-
-
Save anonymous/4374155 to your computer and use it in GitHub Desktop.
Quick and dirty way to sort pictures like picasa does via bash: # 10.8 doesnt have a recent ls, so install gnuls as gls(default name)
sudo port install coreutils +with_default_names
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
gls -l --time-style="+%Y-%m-%d" | while read LINE; do | |
fdate=`echo $LINE | awk -F" " {'print $6'}` | |
fname=`echo $LINE | awk -F" " {'print $7'}` | |
echo "mkdir $fdate"; echo "mv $fname $fdate" | |
done | bash |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment