home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  


UNIX Power Tools

UNIX Power ToolsSearch this book
Previous: 17.25 Keeping find From Searching Networked Filesystems Chapter 18 Next: 18.2 What's Really in a Directory
 

18. Linking, Renaming, and Copying Files

18.1 What's So Complicated About Copying Files?

It hardly seems that there should be enough material to fill an entire chapter with information about linking, moving, and copying files. There are several things that make the topic more complex (and more interesting) than you might expect:

  • In addition to moving and copying files, UNIX systems also allow you to link them - to have two filenames, perhaps in different directories or even on different filesystems, that point to the same file. We talk about why you'd want to do that (article 18.3 ), the difference between "hard" and "soft" links (article 18.4 ), how to create links (article 18.5 ), and various issues that can come up when using links (articles 18.6 , 18.7 , and 18.8 ).

  • It is non-trivial to rename a group of files all at once, but as usual, UNIX provides many ways to circumvent the tedium of renaming files one by one. We show you many different ways to do this, exploring the variety in the UNIX toolbox along the way.

  • In a hierarchical filesystem, you're sometimes faced with the problem of moving not only files but entire directory hierarchies from one place to another. Articles 18.15 and 18.16 show you two ways to do that. Of course, this discussion starts to get into the territory covered by the next two chapters. Chapter 19 covers "archives"-large files that include many other files and directories, with instructions for recreating copies of the original files and directories. Chapter 20 covers backups - which are typically archive files copied to tape.

- TOR


Previous: 17.25 Keeping find From Searching Networked Filesystems UNIX Power Tools Next: 18.2 What's Really in a Directory
17.25 Keeping find From Searching Networked Filesystems Book Index 18.2 What's Really in a Directory

The UNIX CD Bookshelf Navigation The UNIX CD BookshelfUNIX Power ToolsUNIX in a NutshellLearning the vi Editorsed & awkLearning the Korn ShellLearning the UNIX Operating System