|
发表于 2002-12-6 08:50:59
|
显示全部楼层
rename的用法!
早上测试了一下:
假如你所在目录里的文件有:
foo0
foo1
foo2
foo3
foo4
foo5
现在假如你要把
foo0-->foo00
.
.
foo5-->foo05
你只要只如下命令即可:
rename foo foo0 foo?
下面是man rename的帮助文件:
NAME
rename - Rename files
SYNOPSIS
rename from to file...
DESCRIPTION
rename will rename the specified files by replacing the first occurrence of from in their
name by to.
For example, given the files foo1, ..., foo9, foo10, ..., foo278, the commands
rename foo foo0 foo?
rename foo foo0 foo??
will turn them into foo001, ..., foo009, foo010, ..., foo278.
And
rename .htm .html *.htm
will fix the extension of your html files. |
|