11.C.5: Next Taring and Compressing File Structures  11: Up Multiple Machines  11.C.3: Prev Using ftp to Transfer Multiple Files  Contents Contents

Basic

§ 11.C.4: ftp: Transferring Entire File Structures


Imagine that you are about to move to that great job you have been waiting for. So you just can't imagine taking it without taking all your Unix files with you. You need to transfer entire directories and subdirectories. While you might figure out some way to do this with enough wildcards, you really want to preserve the directory and subdirectory structure of the files being transferred. This requires some preparation.

The tape archive command tar creates a single file containing all directories and subdirectories you want to put in it. After you transfer the file, you simply issue the command again to rebuild your directory structure.

To save transfer time and disk (or diskette or tape) space, it's a good idea to compress your tar file before transfer, and then uncompress it afterwards. This is done with the compress and uncompress commands, or, preferably, with the gzip and gunzip commands.

Because these tar and compress are Unix commands, you have to get back to a Unix prompt (shell) to execute them, and then to your home directory to get the files to tar and compress.: