Learn how the mv command moves and renames files safely and efficiently on Linux. 14.04.2026 | reading time: 2 min The mv command is the simplest toolkit for moving and renaming files and directories in Linux; it is fast and available on every distribution, so mastering it is essential for efficient file management. A concrete example Create a small demo, then try the moves: run `mkdir -p /tmp/project/old /tmp/project/new && touch /tmp/project/old/report.txt` to set up, then move the file with `mv /tmp/project/old/report.txt /tmp/project/new/` and finally rename it with `mv /tmp/project/new/report.txt /tmp/project/new/final-report.txt`; check the result with `ls -l /tmp/project/new` which should show the file `final-report.txt`. Overwrite and safety options By default mv silently overwrites existing files; protect work with `-i` to prompt before overwrite or `-n` to never overwrite; use `-v` to see actions as they happen, for example `mv -iv file.txt /dest/` prompts and prints the operation so the admin can confirm before losing data. Patterns and directories Move many files at once with wildcards like `mv /logs/*.log /archive/` and preserve structure by moving directories recursively with `mv /data/olddir /data/newdir`; note that mv moves across filesystems by copying and deleting under the hood, so large moves between mount points take longer. When mv is not enough For advanced needs use `cp` with preservation flags, `rsync` for resumable or remote transfers, or `git` for versioned content; each tool solves a different problem: atomic rename, synchronization, or history tracking. Next step Start practicing in a safe temp directory and add mv options to your toolkit; mastering these patterns makes daily maintenance faster and more reliable and prepares the operator for deeper Linux certification topics. Join Bits & Bytes Academy First class LINUX exam preparation. utilities filesystem scripting