Skip to content

Instantly share code, notes, and snippets.

Created December 25, 2012 16:48
Show Gist options
  • Save anonymous/4374155 to your computer and use it in GitHub Desktop.
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
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