Linux command
rename.ul 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Example
rename.ul foo bar *.txt
Example
rename.ul -n foo bar *
Example
rename.ul -o foo bar *
说明
rename.ul is the util-linux implementation of a simple bulk renamer. It replaces the first (or all) occurrences of the string _from_ with _to_ in the basenames of the listed files. It is intentionally simpler than the Perl-based `rename` found on Debian systems. The syntax is closer to a basic search-and-replace than a full Perl expression engine. Because it only operates on basenames and does not cross directory boundaries by default, it is very safe for everyday bulk renaming tasks.
参数
- -n, --no-act
- Show what would be done, but do not actually rename
- -v, --verbose
- Print the names of files that are renamed
- -o, --one
- Only replace the first occurrence of _from_ in each filename
- -i, --interactive
- Prompt before each rename
- -f, --force
- Overwrite existing files if necessary
FAQ
What is the rename.ul command used for?
rename.ul is the util-linux implementation of a simple bulk renamer. It replaces the first (or all) occurrences of the string _from_ with _to_ in the basenames of the listed files. It is intentionally simpler than the Perl-based `rename` found on Debian systems. The syntax is closer to a basic search-and-replace than a full Perl expression engine. Because it only operates on basenames and does not cross directory boundaries by default, it is very safe for everyday bulk renaming tasks.
How do I run a basic rename.ul example?
Run `rename.ul foo bar *.txt` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -n, --no-act do in rename.ul?
Show what would be done, but do not actually rename