Solaris Advanced User's Guide

Copying Files (cp)

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

$ cp tempfile copyfile

Now list both files. Notice that both names end with the characters “file.” You can use the wildcard character, asterisk (*), to match any character or sequence of characters. The command ls *file lists 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 copying files, see the man page cp(1).