UNIX Commands

June 30th, 2006 by Carl Thomas.

This has nothing to do with revival or the church but every time I need these commands I have to search high and low to find them.

Here’s how to archive the folder named big, and any subfolders, into a gzipped file named big.tar.gz:

% cd `mhpath +`
% tar cvf - big | gzip > big.tar.gz
a big/1 42 blocks
a big/2 247 blocks
...
% ls -l big.tar.gz
-rw-r--r--  1 ehuser    1167386 Nov 14 09:34 big.tar.gz
% rm -r big

Build the tarball with this command:

tar -cvzf name.tgz subdir

where subdir is the name of the subdirectory you want to save. To continue the example, this command would be:

tar -cvzf rainpics.tgz pics

Possibly Related Posts

Share Your Thoughts

Do you have a Gravatar yet? It's that cool icon next to your name. Stop looking like everyone else and upload your own Gravatar for free. If you do, you'll see it by every comment you post on The Revival Blog and every other blog that supports Gravatars!