Quickest Way to Truncate a File in Linux
May 20th, 2008Ready? It’s:
:> filename
(i.e. colon greater-than followed by the name of the file). This can also be used to create a new, empty file.
Ready? It’s:
:> filename
(i.e. colon greater-than followed by the name of the file). This can also be used to create a new, empty file.
Having recently moved from the world of Windows, and even more recently picked up a 2nd Mac, and then even more recently again donated the original Mac to a relative, I hit upon the problem of both Macs having the same name. Of course the network address of each computer was different - one had a “-2″ appended to it, which I wasn’t particularly fond of.
Anyway, as usual, this turns out to be very easy to remedy:
Et voila!
…including those used by EC2 AMIs.
If you get the following error after running ec2-upload-bundle
Server.AccessDenied(403): Access Denied
Bundle upload failed.
…then it’s quite possibly because your S3 bucket name is not globally unique (it doesn’t just have to be unique amongst your own S3 buckets, it needs to be unique amongst everybody’s).
Anyone interested in working with Amazon EC2 should definitely consider the Elasticfox extension for Firefox. It makes the whole thing a breeze and infinitely more accessible than working with the command-line tools.
The only immediate problem with it is the lack of documentation. Thankfully, some helpful users have gone a long way to addressing this by contributing their own instructions.
It’s also worth noting that the EC2 Getting Started Guide still makes reasonable sense when using Elasticfox rather than the command-line tools.
Having been the owner of a white MacBook for a day or so, I’d been casually niggled by the inconsistent nature of the trackpad button. Press it on the right, you get a satisfying ‘click’. Press it on the left and not much happens - just a vague impression of movement with no real feedback.
A quick search on Google yielded an unlikely fix. Essentially, you fold up a tiny piece of paper and shove it in the battery compartment… and, questionable as it seems, it works! It took a bit of experimentation with the paper length (my MacBook seemed to need 2 1/2 inches rather than 4), but I now have a fully clickable trackpad button.