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 can be used to delete or archive old mails. In fact, for archiving its a bit different, you need to archive mails with any tools (e.g archivemail), and then deleting (if you want!).
Here we use -path ".*/cur/*" to avoid files limit in bash globbing and to search in any inbox (e.g .mymail .spam .whatever).
! -newermt "1 week ago" can be read: All files which is older than "1 week ago", adapt it in consequence.
This permit to convert an UNIX file to DOS file.
You can use it in a loop to convert multiple files, like :
for i in *.bat; do sed -i 's/$/\r/' $i; done
Permit to generate a password for userPassword in ldap.
Use ?slappasswd -g? to generate a random passowrd.