更新时间:2023-11-22 23:46:16
您可以使用接受正则表达式的命令rename
重命名一组文件
you can rename a group of files using command rename
that accept regular expression
例如,要重命名所有匹配"* .bak"的文件以去除扩展名,您可能会说
For example, to rename all files matching "*.bak" to strip the extension, you might say
rename 's/\.bak$//' *.bak
要将大写名称转换为小写,请使用
To translate uppercase names to lower, you'd use
rename 'y/A-Z/a-z/' *
和您的答案:
rename 's/%20/ /' *.cpp