Online Linux Terminal Logo
OnlineLinuxTerminal
Операции с файламиCLI Manual

$mv

Move or rename files and directories.

Синтаксис командыPOSIX Standard
mv [OPTIONS] SOURCE... DEST
Сообщество Linux2.4k Онлайн

Общайтесь с пользователями Linux, учите команды и скачивайте шпаргалки.

Попробуйте в интерактивной песочнице

Клиентская симуляция без установки с мгновенным результатом.

Открыть в полноэкранном терминале ↗
bash — terminal

Обзор и принцип работы

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

Основные флаги и параметры команды

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.

Практические примеры использования

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

Renames notes.txt to project_ideas.txt.