Online Linux Terminal Logo
OnlineLinuxTerminal
Opérations sur les fichiersCLI Manual

$mv

Move or rename files and directories.

Syntaxe de la commandePOSIX Standard
mv [OPTIONS] SOURCE... DEST
Communauté Linux2.4k En ligne

Échangez avec des utilisateurs Linux, apprenez des commandes et téléchargez des PDF.

Essayer en direct dans le bac à sable interactif

Simulation côté client sans installation avec retour instantané.

Ouvrir dans le terminal plein écran ↗
bash — terminal

Aperçu et fonctionnement

`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.

Options et drapeaux courants

Flag / OptionDescription
-iPrompt before overwriting an existing destination file.
-fForce overwrite without prompting.
-nDo not overwrite an existing file (no-clobber).
-vVerbose mode explaining actions being taken.

Exemples pratiques du monde réel

#1Rename a file in the current directory
mv notes.txt project_ideas.txt && ls -l

Renames notes.txt to project_ideas.txt.