Thursday, April 22, 2010

Monitoring the progress of a compressed tar file

Here's a fun UNIX trick that I came up with while attempting to prepare a Ubuntu 9.10 tar file for a Solaris BrandZ installation.

Suppose that you want to monitor the progress of the creation of a tar file on a remote machine -- and you forgot to specify tar's -t option when creating the tar file. No problem! Use tail +1; e.g.:

tail -fc +1 ubuntu9_10.tar.gz | tar -tz