Copying & Moving Files

Unix also includes commands for copying and moving files: cp and mv. These commands enable you to copy or move one or more source files to a target file or directory.

✓ Tips

  • Why copy a file? Usually, to make a backup. For instance, before you edit a configuration file, you should create a backup copy of the original. This way you can revert back to the original if your edits “break” something in the file.

  • The mv command can also be used to rename a file.

  • The cp and mv commands support several options. You can learn more about them in the man pages for these commands. Type man cp or man mv and press to view each command’s ...

Get Mac OS X 10.4 Tiger: Visual QuickStart Guide 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.