返回命令列表

Linux command

Batch rename files

文件

Uses pipes, overwrite, or deletion. Check paths and options first.

命令示例

Batch rename files

for f in *.txt; do mv "$f" "${f%.txt}.bak"; done

说明

Useful Linux one-liner

FAQ

What is the for command used for?

Useful Linux one-liner

How do I run a basic for example?

Run `for f in *.txt; do mv "$f" "${f%.txt}.bak"; done` in a terminal, then adjust file names, paths, flags, or remote targets for your system.