Zombie Zen

Posts tagged "UNIX"

Today I Learned: rsync

Posted at by Ross Light

rsync is a wonderfully useful utility for copying files both locally and between machines. It makes a reasonable effort to copy only files that have changed, which can save a tremendous amount of time in many scenarios. However, I’ve always been a bit daunted by its plethora of command-line options, and would always resort to its man page for every invocation. Thus, it would never stick in my set of tools I would commonly use. After doing some work where rsync really was the only tool for the job, I decided to finally make a little cheatsheet on how to use rsync.

Read more…
Posted at
Permalink

A night of fun hacks

Posted at by Ross Light

I discovered that some of my code was still living on my old laptop from high school. The laptop hadn’t been booted in about 4 years, so the clock battery had died, causing the filesystem checks to fail (this is Ubuntu 9.10, which cared about these things). I reset the clock manually, boot up the machine, and decide that to be on the safe (but marginally inefficient) side, I’ll copy my entire multi-GB home directory to my more beefy desktop and filter out what I don’t want there.

Sadly, this laptop came before 802.11n and is limited to 54 Mbps. I have an AirPort Express with only one local port, which is connected to my desktop, but I don’t want to disrupt the network setup. I realize I can chain the Ethernet from my old laptop (named metroid) to my new laptop (named roran), which has 802.11n to connect to my desktop (named nasuada).

It's a UNIX system. I know this.
ross@nasuada$ nc -l 8080 > mybackup.tar.bz2
ross@roran$ nc -l 8080 | nc nasuada.local 8080
ross@metroid$ tar -jcf - $HOME | nc roran.local 8080



I love Unix.

Posted at
Permalink

Unix Command Line of the Day

Posted at by Ross Light

I wanted to paste a text file with my homework assignment into Gmail. Unfortunately, said text file was on the school server and I really didn’t want to permanently download the thing to my hard drive. So this is what I did:

scp $vogon:~/graph.txt /dev/stdout | pbcopy

This connects to the school server, retrieves graph.txt from my home directory, and copies it to standard out. I then piped the text into pbcopy, which is the Mac utility for manipulating the clipboard. After that, I switched to Gmail and did a paste.

Unix/bash is cool!

Posted at
Permalink

vi: I Love You.

Posted at by Ross Light

I’m reading a book about the vi editor right now. For those less UNIX-inclined, vi is a command-line based text editor for UNIX systems like Linux, FreeBSD, and Mac OS X. It’s installed on basically every system (in some flavor or another. I prefer strawberry Vim, but I’ve been told the cinnamon variety deserves a second glance) and is remarkably easy to use.

It’s also more powerful than I realized.

The problem is that you need to find a good guide to vi. Its built-in help is wonderful reference, but it can’t get you up and running. For years, I’ve been bound to only a fraction of the commands. No more. Why would I use anything else?

[Cue angry Emacs users]

If my readers are so inclined, I may start posting some vi tips.

Posted at
Permalink

100th Post!

Posted at by Ross Light
A DOS prompt makes me sad. A bash prompt elicits unbridled joy in my heart.

The above quote came out of a rather interesting discussion in my early morning programming lecture.

And as stated above, this is my 100th post! I’d like to thank my kind readers and followers for making Zombie Zen a wonderful experience. To celebrate the occasion, I thought I’d send along a picture!

100th post!

HOPE YOU LIKE FINGER CONTORTIONS. :P

Posted at
Permalink