$mv
Move or rename files and directories.
mv [OPTIONS] SOURCE... DESTTry `mv` Live in Interactive Sandbox
Zero-install client simulation with real-time feedback.
Overview & How mv Works
`mv` (Move) renames files and directories or moves them across different folder locations. If source and destination are on the same filesystem partition, `mv` is an atomic inode pointer update that executes instantly regardless of file size.
Common Flags & Command Options
| Flag / Option | Description |
|---|---|
| -i | Prompt before overwriting an existing destination file. |
| -f | Force overwrite without prompting. |
| -n | Do not overwrite an existing file (no-clobber). |
| -v | Verbose mode explaining actions being taken. |
Practical Real-World Examples
mv notes.txt project_ideas.txt && ls -lRenames notes.txt to project_ideas.txt.
Frequently Asked Questions
Is moving a file between two folders on the same drive instantaneous?
Yes. On the same filesystem partition, `mv` simply re-links the directory inode without copying data blocks across disk.
Related Linux Commands
Search for files and directories in a directory hierarchy based on name, type, size, or modification date.
Concatenate and print file contents directly to the terminal standard output.
Create new directories and folder hierarchies.
Remove files or directories from the filesystem.
Copy files and directories to a destination path.
Create empty files or update file access and modification timestamps.