3.19. Copying a File: cpAfter moving into the "lyrics" directory, I decided to work on a second version of my lyrics. I wanted to keep the first version for posterity, so I copied "heart.ver1" into a new file called "heart.ver2" and then edited the new file. To copy the file I used the cp utility, which works as described in Figure 3-23.
cp actually does two things:
The new copy of the original file can therefore be edited, removed, and otherwise manipulated without having any effect on the original file. Here's how I copied the "heart.ver1" file: $ cp heart.ver1 heart.ver2 ...copy to "heart.ver2". $ ls -lG heart.ver1 heart.ver2 ...confirm. -rw-r--r-- 1 glass 106 Jan 30 23:28 heart.ver1 -rw-r--r-- 1 glass 106 Jan 31 00:12 heart.ver2 $ _ |