touch f{1..10}.txt
f1.txt f10.txt f2.txt f3.txt f4.txt f5.txt f6.txt f7.txt f8.txt f9.txt
?可替代單個字符
*可替代多個字符
[charset]可替代charset集中的任意單個字符
f10.txt f3.txt f5.txt f7.txt f9.txt f2.txt f4.txt f6.txt f8.txt newf1.txt
> ls
f10.txt f3.txt f5.txt f7.txt f9.txt
f2.txt f4.txt f6.txt f8.txt newf1.txt
> rename f f0 f?.txt
> ls
f02.txt f04.txt f06.txt f08.txt f10.txt
f03.txt f05.txt f07.txt f09.txt newf1.txt
> ls
f1.txt f10.txt f2.txt f3.txt f4.txt f5.txt f6.txt f7.txt f8.txt f9.txt
> rename .txt .html *.txt
> ls
f1.html f2.html f4.html f6.html f8.html
f10.html f3.html f5.html f7.html f9.html
rename .html .php f*.html
rename .html .php f*.html
> ls
f10.php f2.php f3.php f4.php f5.php f6.php f7.php f8.php f9.php
rename 'y/a-z/A-Z/' * 或 reanme f F *
ls
f10.php f1.php f2.php f3.php f4.php f5.php f6.php f7.php f8.php f9.php
rename 'y/a-z/A-Z/' *
F10.PHP F1.PHP F2.PHP F3.PHP F4.PHP F5.PHP F6.PHP F7.PHP F8.PHP F9.PHP
> ls
F1.php F10.php F2.php F3.php F4.php F5.php F6.php F7.php F8.php F9.php
> rename F F00 *
> ls
F001.php F002.php F004.php F006.php F008.php
F0010.php F003.php F005.php F007.php F009.php