Copying, Moving, or Renaming Files

In many instances you will need to rework a file’s name or location, and you may have special concerns for each action. UNIX has a number of commands and options for these procedures; the following sections detail the available commands and options.

Copying a File Within the Current Directory

Use the cp command to copy a file, which means to create a second identical file with a different name.

Signs your UNIX is too Old

Is -i an illegal option to cp or mv on your UNIX system? Are you restricted to only 14 characters in a filename? Is the Korn or Bash shell not available on your system? If you answered yes to any of these questions, you should consider upgrading to a more modern version of UNIX.

This is one ...

Get Practical UNIX now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.