All 2 entries tagged Unix

View all 18 entries tagged Unix on Warwick Blogs | View entries tagged Unix at Technorati | There are no images tagged Unix on this blog

September 07, 2005

How to watch HTTP headers

I suspect I am the only person who will ever need this, but I'm sufficiently pleased with it to make a permanent record here:

will print the HTTP headers for each request/response pair, without any of the HTML guff (which, lets face it, is rarely interesting).

The awk trickery came from this useful reference page

postscript: textile doesn't seem to be making a very good job of rendering the hat characters. I'll see if I can entify them or something…

post-postscript: HAH! I spurn textile. from now on I'm going to make all my posts in .png format. maybe.

September 06, 2005

Idiot's guide to rsync

rsync is a super-useful tool. All unixes have it, and you can get it as part of cygwin for your windows PC. The most common use I have for it is to replicate a directory – either from one machine to another or from a HDD to some removeable storage.

Unfortunately, it's a big and complicated application. The manual page begins "There are eight different ways of using rsync. They are: …" and continues to describe each in excruciating detail. So, here's the ultra-abridged version

rsync -av --exclude '*.class' --exclude 'CVS' user@host:/from-directory/ /to-directory

which means 'copy everything from {/from-directory} on {host} (logging in as {user} ) to {/to-directory} on this machine. Except anything called "CVS" or anything ending in ".class".

You can have as many —excludes as you like, though if there's lots of them you can specify a file of them instead. This will copy symlinks over as-is, which may or may not be what you want. Presumably there's a way to not do that. If you're doing a local->local copy, just drop the "user@host:

Most recent entries


Search this blog

on twitter...


    RSS2.0 Atom
    Not signed in
    Sign in

    Powered by BlogBuilder
    © MMXXI