commandlinefu.com is the place to record those command-line gems that you return to again and again.
You can sign-in using OpenID credentials, or register a traditional username and password.
Subscribe to the feed for:
This will mv all your mp3 files in the current directory to $ARTIST/$ALBUM/$NAME.mp3
Make sure not to use sudo - as some weird things can happen if the mp3 file doesn't have id3 tags.