# Posts Tagged "linux"

## Surprising behavior in GNU tar

Here's a fun game for you: what do you expect to be the state of the filesystem after running the following commands in an empty directory on a Linux system?

$touch foo:bar$ tar -cpf foo:bar.tar foo:bar
$rm foo:bar$ tar -xpf foo:bar.tar

Do you expect the directory to contain the files foo:bar and foo:bar.tar?

What if I told you that instead the directory would only contain foo:bar.tar and stderr would say

tar (child): Cannot connect to foo: resolve failed

Yep! It turns out that GNU tar, if passed a …

## systemd

I've had this sitting on my desktop for months and figured I'd post it. No idea where it originally came from.

## <3 sed

I wrote a fun sed script today:

sed -E -n -e ':t ; s/(.{21})(.*)/\\bf\{\1\}\n\2/ ; p ; s/\\bf\{(.*)\}\n.*/\1/ ; h ; :q { n ; G ; s/(.{21})(.*)\n\1/\2/ ; tp ; s/(.+)\n.*/\1/ ; bt} ; :p { P ; bq }'

Short, but effective. Can you figure out what it does?

(solution after the break)

## My Storage Problem

Storage is cheap, or so we're told. Amazon will sell me storage for $0.055/GB/month in “the cloud”; 3.5" hard drives are hovering around$0.06/GB. However, my laptop has a little 250GB SATA drive that is (a) slow and (b) getting full. So I desire to replace it with a fast little SSD. But that raises the question of what to do with my stuff. I'm asking you, Internet. Details below the fold.

So, I got one of the Internet-legendary $99 TouchPads (well,$149 actually, but whatever). As some of you may know, I was an enormous Palm fanboy during the 90's. So it was pretty inevitable that I would end up purchasing one of their WebOS products, even though there's not a lot in common between this and Jeff Hawkins' wooden cutout Palm Pilot. Anyhow, this is probably going to be the nerdiest review of the TouchPad posted on the Internet. It mostly is concerned with keyboard mappings. Enjoy!