# Copy, Move & Remove — Linux Command Line Fundamentals

Source: https://www.skillbyai.com/en/linux/linux-copy-move-remove

> Copy, move, rename and delete files with cp, mv and rm, and learn why rm has no undo.

## cp — copy

`cp source dest` copies a file. Add `-r` to copy a directory recursively.

```bash
cp notes.txt notes-backup.txt
cp -r projects projects-backup
```

## mv — move or rename

`mv` moves a file, or renames it if the destination is in the same directory.

```bash
mv notes.txt archive/
mv oldname.txt newname.txt
```

## rm has no undo

`rm file` deletes permanently — no trash bin. `rm -r dir` deletes a directory and its contents. Use `rm -i` to confirm each deletion while you're still building confidence.
