OpenWindows Advanced User's Guide

3.2.4 Copying Files (cp)

Use the cp command to copy tempfile to a file called copyfile:

$ cp tempfile copyfile
$ 

Now try listing both files. Notice that both names end with the characters "file." You can use the wildcard character, asterisk (*), to stand for any character or sequence of characters. Therefore, the command ls *file should list both tempfile and copyfile (and any other file in this directory with a name that ends with file):

$ ls *file
copyfile    tempfile

Notice that copyfile is listed first. Files are listed in alphabetical order. (Capital letters and numbers precede lowercase letters.)

For detailed information on the cp(1) command, refer to the man Pages(1): User Commands.