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:
Will move in that case every file in the current folder older than 30 days to the "old" folder
Replace "mv $i old/" by any command such as rm / echo to do something different.