The worst part of living in a nice big house is the headache of moving. The more stuff you’ve got room for, the more trouble it is to pack it up and take it with you.
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 writing the files to a tape for safety (Section 38.3). 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 program tar ( Section 38.2 ...