# Copy, Move and Rename: cp and mv

mv moves a file into another folder or gives it a new name, cp makes a copy and leaves the original where it was, cp -r copies a whole folder, and -i or -n stop either one from replacing a file by surprise.

![Cheat sheet for the lesson Copy, Move and Rename: cp and mv: mv moves a file into another folder or gives it a new name, cp makes a copy and leaves the original where it was, cp -r copies a whole folder, and -i or -n stop either one from replacing a file by surprise.](https://fsdtrainingmedia.blob.core.windows.net/public/images/2026/11/7059b17fbe424d038983be90bb03c83c.webp)

- Category: Bash
- Level: Novice
- Tags: cp, linux, mv, unix
- Updated: November 10, 2026

Source: https://www.ask-codey.com/cheat-sheets/bash-copy-move-rename-cheat-sheet
