Операции с файламиCLI Manual
$mv
Move or rename files and directories.
Синтаксис командыPOSIX Standard
mv [OPTIONS] SOURCE... DESTПопробуйте в интерактивной песочнице
Клиентская симуляция без установки с мгновенным результатом.
bash — terminal
AST Sandbox (Free)
Обзор и принцип работы
`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 / 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. |
Практические примеры использования
#1Rename a file in the current directory
mv notes.txt project_ideas.txt && ls -lRenames notes.txt to project_ideas.txt.
Похожие команды Linux
$findОперации с файлами
Поиск файлов и директорий в иерархии каталогов по имени, типу, размеру или дате изменения.
$catОперации с файлами
Чтение и объединение содержимого файлов с выводом в терминал.
$mkdirОперации с файлами
Create new directories and folder hierarchies.
$rmОперации с файлами
Remove files or directories from the filesystem.
$cpОперации с файлами
Copy files and directories to a destination path.
$touchОперации с файлами
Create empty files or update file access and modification timestamps.