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 is just a little snippit to split a large file into smaller chunks (4mb in this example) and then send the chunks off to (e)mail for archival using mutt.
I usually encrypt the file before splitting it using openssl:
openssl des3 -salt -k <password> -in file.tgz -out file.tgz.des3
To restore, simply save attachments and rejoin them using:
cat file.tgz.* > output_name.tgz
and if encrypted, decrypt using:
openssl des3 -d -salt -k <password> -in file.tgz.des3 -out file.tgz
edit: (changed "g" to "e" for political correctness)
Dumps a compressed svn backup to a file, and emails the files along with any messages as the body of the email
Another way of sending an attachment.
-s : subject
file : file to be sent
Send it the easy way, with MIME and everything handled for you by an app that knows best.
Of course, you can adjust "Maildir" to your config...
This command uses mutt to send the mail. You must pipe in a body, otherwise mutt will prompt you for some stuff. If you don't have mutt, it should be dead easy to install.