Tar through ssh

I love this command, which I’ve stolen from an article titled “Tar through ssh” by Graeme Winter on linux.com:

To transfer a (large, complicated) file tree from one machine to another, using stuff which is usually supported:

tar cf – stuff | ssh bob@wendy.no.where.com tar xf – -C /home/brian


(tar cf – stuff) – tar stuff to the standard output
(| ssh bob@wendy.no.where.com) – pipe this to an ssh connection to wendy – where
(tar xf – -C /home/brian) – is run – which will untar the standard input and place the result in /home/brian….

Neat. This is better than using scp -r or tar then scp, because you can send > 4 gig files, and also retain softlinks etc which get broken by scp…

Or, to go the other way:

ssh bob@wendy.no.where.com tar cf – /path/to/stuff | tar xf – -C /final/destination


Gallery2 and iPhotoToGallery

Finally, I have discovered a way to painlessly publish my iPhoto albums / rolls / whatever to the web without having to use .Mac. The server side is Gallery2 and the iPhoto plugin is iPhotoToGallery. Supposedly Gallery2 can integrate with WordPress so you might see something fancy happening here soon. 🙂

aptitude: symbol lookup error: aptitude: undefined symbol: _ZN9pkgPolicyD2Ev

Recently, doing an `aptitude update; aptitude upgrade` broke with the above error. The output looked like this:

~$ sudo aptitude upgrade
Reading package lists… Done
Building dependency tree… Done
Reading extended state information
Initializing package states… Done
Reading task descriptions… Done
Building tag database… Done
The following packages have been kept back:
apache2 apache2-mpm-prefork apache2-utils apt cpp g++ gcc gnupg
initscripts libapache2-mod-php4 libapache2-svn libsasl2
linux-image-2.6-686-smp mutt netbase nfs-common ntp ntp-simple php4
php4-common python reportbug subversion subversion-tools sysvinit
0 packages upgraded, 0 newly installed, 0 to remove and 25 not upgraded.
Need to get 0B of archives. After unpacking 0B will be used.
aptitude: symbol lookup error: aptitude: undefined symbol: _ZN9pkgPolicyD2Ev

I ended up running `apt-get install apt` and it upgraded apt/aptitude to a newer version and my problem went away. Funky.