Skip to content

Instantly share code, notes, and snippets.

@erichelgeson
Forked from anonymous/gist:4374155
Created July 2, 2013 01:04
Show Gist options
  • Save erichelgeson/5906030 to your computer and use it in GitHub Desktop.
Save erichelgeson/5906030 to your computer and use it in GitHub Desktop.
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