George V. Reilly

Compressing Tar Files in Parallel

TL;DR: use tar -I pigz or tar -I lbzip2 to compress large tar files much more quickly.

I in­ves­ti­gat­ed various ways of com­press­ing a 7GiB tar file.

The built-in --gzip and --bzip2 com­pres­sion methods in GNU tar are single-threaded. If you invoke an external compressor with --use-compress-program, you can get some huge reductions in com­pres­sion time, with slightly worse com­pres­sion ratios.

You can use pigz as a parallel re­place­ment for gzip and lbzip2 as a parallel version of bzip2. Both of them will make heavy use of all the cores in your system, greatly reducing the real time relative to the user time.

Single-threaded com­pres­sion timing: gzip is a lot faster than bzip2:

$ 
continue.

The Unix file Command

I had forgotten all about the file command until it was mentioned in a Stack­Over­flow answer today. If you run file some.iso, it will display the label embedded in the disk image. More generally, you can run file on many different kinds of files and it will do a decent job of iden­ti­fy­ing the type of data.

Installing Python 2.7.11 on Ubuntu

We deploy on Ubuntu 14.04, the most recent Long Term Support release. It comes with Python 2.7.6, but we need Python 2.7.9+ to get the some important SSL fixes and work with a recent version of the Requests library.

Felix Krull maintains a Personal Package Archive for Python 2.7 Updates, which makes it straight­for­ward to upgrade to Python 2.7.11 on supported versions of Ubuntu.

sudo apt-add-repository ppa:fkrull/deadsnakes-python2.7
sudo apt-get update
sudo apt-get install python2.7 python2.7-dev

Be sure not to use Felix Krull's other Python PPA by mistake. I did that on a col­league's machine yesterday. In our attempts to figure out why we still had Python 2.7.6, we managed to mess up the continue.

USB 3 Drivers on a Lenovo E545

Emma's been com­plain­ing for some time that USB devices only worked in one port on her Lenovo E545 laptop. The USB 2 port worked; the USB 3 ports didn't.

I took a look at Device Manager, and I noticed that most of the USB nodes looked wrong. She went to the Lenovo website and downloaded two USB-related drivers, the AMD USB Filter Driver and the AMD USB 3.0 Driver. Between them, they fixed the problem and she now has all ports working.

This machine is running Windows 7. At some point, she wiped the machine to get rid of Lenovo crapware, and installed a clean copy of Windows 7. She downloaded a continue.

Ubuntu Netbook Remix 9.04

I spent much of today playing around with the brand-new Jaunty/9.04 release of the Ubuntu Netbook Remix on my Eee 1000H netbook. Previously I had run the Hardy/8.04 version of Ubuntu Eee on this system. I had never bothered to update to Intrepid/8.10, but now that UNR is fully supported by Canonical, I thought it was time to try it out.

I downloaded the UNR image last night onto my Mac, and trans­ferred the image to a 1GB USB stick this morning. (The Mac in­struc­tions required a little tweaking.)

I spent some time running the Live Image first, before clean installing. Everything worked seamlessly except the microphone. WiFi worked, the webcam worked, continue.

NTFS-3G: the universal filesystem

After I started running Linux and then Mac OS X, in addition to Windows, I started on a quest to find the universal filesystem. I had multiboot systems and external drives where I wanted to to be able to read and write disks under multiple operating systems.

The obvious choice is FAT32, the ubiquitous, lowest-common de­nom­i­na­tor filesystem. FAT32 is supported out-of-the-box by all major operating systems, digital cameras, and PDAs, so that's a huge advantage. FAT32 also has major short­com­ings:

Command-line Tools for the Clipboard

I mentioned in my post on re­Struc­tured­Text that I use a little command-line tool, pbcopy, to pipe the output into the clipboard. I finally found a similar tool for Linux, xsel.

Eee

I've been very happy with my MacBook Pro. It's my primary home machine, sitting on the living room coffee table, and getting far more use than the desktop system in my office upstairs.

But it rarely leaves the house. It's big–a 17" screen–and it's heavy. I seldom carry it anywhere and I hardly ever bring it to a coffee shop.

I bought myself a netbook last month, an Asus Eee 1000H: 10" screen, 1024x600, 1.6GHz dual core Atom, 1GB RAM, 160GB hard disk, 3lbs, $479. Look at how much bigger the MacBook is in the photo! For reference, the Eee 1000H is the same size as a magazine. It's small enough and light continue.

Sharing Dotfiles between Windows and \*nix

Tomas Restrepo wrote a post about sharing dotfiles between Windows and Ubuntu, specif­i­cal­ly about sharing .vimrc (Linux) and _vimrc (Windows) and the .vim (Linux) and vimfiles (Windows) di­rec­to­ries.

I have a different solution. On Windows, my C:\AutoExec.bat includes:

set HOME=C:\gvr
set VIM=C:\Vim
set VIMDIR=%VIM%\vim71
set EDITOR=%VIMDIR%\gvim.exe
set PATH=%PATH%;C:\Win32app;C:\GnuWin32\bin;C:\UnxUtils;C:\SysInternals;C:\Python25\Scripts

%HOME% (C:\gvr) contains _vimrc, vimfiles, and other stuff ac­cu­mu­lat­ed over many years. This directory is stored in a personal Subversion repository at DevjaVu. All my Vim files are stored with Unix LF endings, not Windows CR-LFs, so that they'll work on my Mac OS X and Linux boxen. I play some games with if has("win32") and if has('gui_­macvim') to ensure that my _vimrc works cross-platform.

On my *nix boxes, the gvr continue.

Installing Rainlendar on Kubuntu

I've dualbooted my laptop between Linux and Windows since June, spending nearly all of my time in Linux. I started out with Ubuntu 6.06 (Dapper Drake), but soon switched to Kubuntu (the KDE variant), later upgrading to Kubuntu 6.10 (Edgy Eft).

To make this useful, certain key ap­pli­ca­tions have to be available in both Windows and Linux. Firefox for browsing; Thun­der­bird for email; Rainlendar for calendar; KeePass and KeePassX for password man­age­men­t; among others.

My laptop has four partitions:

Previous »