Linux command
qmv 命令
文件
复制后可按需替换文件名、目录或参数。
常用示例
Rename files
qmv [files]
Rename everything
qmv *
Pick a specific editor
qmv -e [vim] [files]
Use single-column format
qmv -f sc [files]
Use destination-only format
qmv -f do [files]
Dry run
qmv --dummy [files]
Verbose output
qmv -v [files]
说明
qmv (quick move) opens a list of filenames in a text editor so you can batch-rename by editing the destination column. When the editor exits, qmv compares the edited file with the original and applies each change as a rename. This lets you use familiar editor features — search and replace, macros, multi-cursor — for bulk renames. qmv detects potential conflicts (cycles, collisions) and resolves them via intermediate renames. If a destination exists, you are prompted before overwriting.
参数
- -f, --format=_FORMAT_
- Edit format to use: `dc` (dual-column, default), `sc` (single-column), or `do` (destination-only).
- -o, --options=_OPTIONS_
- Pass comma-separated options to the selected edit format (e.g. `swap`, `blank`, `autowidth`). Use `--options=help` for a list.
- -e, --editor=_PROGRAM_
- Text editor to open the file list in. Falls back to `$VISUAL`, `$EDITOR`, then a built-in default.
- --command=_COMMAND_
- Use _COMMAND_ to perform renames instead of `mv`.
- --ls=_PROGRAM_
- Path to the `ls` program used to list directory contents.
- -i, --interactive
- Start in command mode rather than invoking the editor immediately.
- -v, --verbose
- Print each rename as it is performed.
- --dummy
- Do everything as usual except the actual renames (dry run).
- --help
- Show option summary.
- --version
- Show version information.
FAQ
What is the qmv command used for?
qmv (quick move) opens a list of filenames in a text editor so you can batch-rename by editing the destination column. When the editor exits, qmv compares the edited file with the original and applies each change as a rename. This lets you use familiar editor features — search and replace, macros, multi-cursor — for bulk renames. qmv detects potential conflicts (cycles, collisions) and resolves them via intermediate renames. If a destination exists, you are prompted before overwriting.
How do I run a basic qmv example?
Run `qmv [files]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -f, --format=_FORMAT_ do in qmv?
Edit format to use: `dc` (dual-column, default), `sc` (single-column), or `do` (destination-only).