New category: Unix tips
At last, somewhere to collect useful unix one-liners.
Unix/linux is great. It’ll do anything for you. You just need to know how to ask it.
Wouldn’t it be great if you could just type something like:
COMPUTER: ROTATE IMAGE 90 DEGREES AND UPLOAD IT TO THE INTERHNESTS!!
Yes. But actually you have to type:
convert -rotate 90 img.png img.rot.png && scp img.rot.png motd.org:~/html/
Which isn’t so bad, in that case, and actually I wouldn’t bother sharing such an everyday command. But when it comes to, say, converting a bunch of jpegs into an AVI file, invoking gimp with a little script-fu one-liner to batch lighten a bunch of photos, or anything else remotely exotic, the commands quickly become highly forgettable.
So, whenever I find or figure out how to make unix do my bidding in new and increasingly evil ways, I’ll post the tips here, both for my own reference and to help despairing unix googlers.