next up previous contents
Next: What Really Happens? Up: Working with Unix Previous: Working with Unix

Wildcards

 

   

In the previous chapter, you learned about the file maintence commands cp, mv, and rm. Occasionally, you want to deal with more than one file at once---in fact, you might want to deal with many files at once. For instance, you might want to copy all the files beginning with data into a directory called /backup. You could do this by either running many cp commands, or you could list every file on one command line. Both of these methods would take a long time, however, and you have a large chance of making an error.

A better way of doing that task is to type:

As you can see, the asterisk told cp to take all of the files beginning with data and copy them to /backup. Can you guess what cp d*w /backup would have done?





Ross Biro
Thu May 25 10:45:54 PDT 1995