Packing Up and Moving
Introduction to Shell Archives
unshar: Unarchive a Shell Archive
A Simple Version of unshar
Using tar to Create and Unpack Archives
GNU tar Sampler
Extracting Files from a Compressed Archive
Problems with Verbose tar
A System V Tape Archiver: cpio
The UNIX operating system is a little bit like that. One of its real advantages is a filesystem that lets you organize your personal files into a hierarchical directory tree just like the much bigger tree that encompasses the entire filesystem. You can squirrel away all kinds of useful information into neat pigeonholes.
While your personal directory hierarchy is usually only two or three levels deep, for all practical purposes it can have as many levels as you like. And, as is true of any powerful and flexible tool, problems lie in wait for the sorcerer's apprentice. Directories and files grow increasingly complex the longer you use the system, with more forgotten files and more detailed organization.
This chapter will tackle the problems that can arise when you want to move a block of files (in one or many directories) from one place to another.
Maybe you're. In many cases though, this is a "backup and restore" problem. For example, if you were moving your account to another system, you might just ask the system administrator (if there is one) to archive your files to tape or floppy and restore them in the new location. Many new users are less aware that you can use the backup programs and (as well as some common archive programs like ) to create online archives that you can move from one place to another.
This situation is most likely to arise in a networked environment. You might be packaging files to ship as a package to another user. The files might be going to Usenet or an archive site on the Internet, for distribution to many users. Even though we've made a to omit networking information from this book these programs are so useful even on a single system (let alone one without the artificial boundaries we've put on this book) that we decided we ought to keep this chapter in the book.