tar, compress, uuencode, zcat
----------------------------------------------------------------------------
tar cf TARGET.tar TARGET || Create a tar file of a directory
|| called TARGET.
||
tar tf TARGET.tar || Find out what's in the tar file.
||
tar uf TARGET.tar newfile || Add file "newfile" to the tar file.
||
tar xf TARGET.tar newfile || Extract file "newfile" from the tar
|| file.
tar xf TARGET.tar || Extract everything from the tar file.
|| (It recursively creates directories
|| as needed to recreate the directory
|| structure.)
||
You can also add "v" to each of the above which turns on verbose mode. This
shows the files and directories as they are processed. Eg.
tar cvf ..., tar xvf ... etc.
compress somefile || Compress a file, you get somefile.Z
|| You can compress a tar file and most
|| other types of files, but you cannot
|| compress a compressed file.
||
uncompress somefile || Uncompress (expand) a file. The name
|| of the existing file is somefile.Z,
|| and afterwards there is only "somefile"
||
zcat somefile.Z || uncompresses and cat's the file on the
|| fly, but does not create an uncompres-
|| sed file or change the existing Z file
If you want to send this file through email you MUST do the following to convert
all unprintable ASCII characters to printable.
uuencode TARGET.tar.Z TARGET.tar.Z > TARGET.encoded || encode a binary file
||
uudecode TARGET.encoded || The inverse of uuencode, It creates
|| the file TARGET.tar.Z
Alternative: if you are really cramped for space, don't fully uncompress
the file before untarring it, but rather use zcat in a pipeline:
% zcat TARGET.tar.Z | tar xf -
or to view the table of contents without wasting space:
% zcat TARGET.tar.Z | tar tf - | less