TL;DR: use tar -I pigz or tar -I lbzip2
to compress large tar files much more quickly.
I investigated various ways of compressing a 7GiB tar file.
The built-in --gzip and --bzip2 compression methods in GNU tar
are single-threaded.
If you invoke an external compressor with --use-compress-program,
you can get some huge reductions in compression time,
with slightly worse compression ratios.
You can use pigz as a parallel replacement 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 compression timing:
gzip is a lot faster than bzip2:
$
…continue.
I had forgotten all about the file command
until it was mentioned in a StackOverflow 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 identifying the type of data.
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 straightforward 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 colleague's machine yesterday.
In our attempts to figure out why we still had Python 2.7.6,
we managed to mess up the …continue.
Emma's been complaining 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.
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 transferred the image to a 1GB USB stick this morning.
(The Mac instructions 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.
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 denominator 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 shortcomings:
- Maximum file size is 4GB. I have ISOs, MPEGs, and other large files exceeding this limit.
- Fragmentation happens too easily.
- Timestamps: accurate only to 2-second resolution. No notion of timezones or UTC.
- Journaling: …continue.
I mentioned in my post on reStructuredText 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.
- Mac: pbcopy (UTF-8 aware, unlike the built-in version of pbcopy)
copies its input to the pasteboard (Mac name for the clipboard);
pbpaste writes the pasteboard to stdout.
- Linux: xsel gets and sets the X selection.
- Windows: winclip reads and writes the clipboard in a variety of formats.
Use -m for UTF-8 text.
The winclip binary is available as part of the outwit package.
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.
Tomas Restrepo wrote a post about
sharing dotfiles between Windows and Ubuntu,
specifically about sharing .vimrc (Linux) and _vimrc (Windows)
and the .vim (Linux) and vimfiles (Windows) directories.
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 accumulated 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.
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 applications have to be available in both
Windows and Linux. Firefox for browsing; Thunderbird for email;
Rainlendar for calendar; KeePass and KeePassX for password management;
among others.
My laptop has four partitions:
- Primary 1, NTFS - Windows, aka /windows or /dev/hda1. 8GB
- Primary 2, Ext3 - Linux system partition, aka / or /dev/hda2. 12GB
- Extended 1. Linux swap partition. 2GB.
- Extended 2, Ext3. Shared partition, …continue.
Previous »