例:
filename-1.txt.bak
filename-2.txt.bak
filename-3.txt.bak
filename-4.txt.bak
改为
filename-1.txt
filename-2.txt
filename-3.txt
filename-4.txt
用命令:
mv *.txt.bak *.txt
不行!
要如何写,谢谢。
请教如何用命令来批量修改文件名?[已经解决]
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
-
- 帖子: 75
- 注册时间: 2007-02-06 21:58
请教如何用命令来批量修改文件名?[已经解决]
上次由 aszxas 在 2007-02-12 11:18,总共编辑 1 次。
- BigSnake.NET
- 帖子: 12522
- 注册时间: 2006-07-02 11:16
- 来自: 廣州
- 联系:
-
- 帖子: 955
- 注册时间: 2006-12-18 17:04
- 来自: 福建泉州
- Jimmy.Zhou
- 帖子: 475
- 注册时间: 2006-12-05 21:51
- 来自: Vienna, Austria
呵呵,大家可以多到linuxtoy去看看,那里有很多好东西的。
比如lz和ls的问题都有解决的:
Krusader-双面板文件管理器,跟tc很像的,虽然是kde的软件,不过gnome也没有问题了。
http://linuxtoy.org/archives/krusader.html
在 Nautilus 中执行批量重命名操作
http://linuxtoy.org/archives/batch-rena ... tilus.html
比如lz和ls的问题都有解决的:
Krusader-双面板文件管理器,跟tc很像的,虽然是kde的软件,不过gnome也没有问题了。
http://linuxtoy.org/archives/krusader.html
在 Nautilus 中执行批量重命名操作
http://linuxtoy.org/archives/batch-rena ... tilus.html
Jimmy.Zhou
Acer Extensa 5620G
T5250 + HD 2400 XT + 2G DDR2 +160G SATA + iwp 3945
Ubuntu Intrepid Ibex + Firefox 3
Acer Extensa 5620G
T5250 + HD 2400 XT + 2G DDR2 +160G SATA + iwp 3945
Ubuntu Intrepid Ibex + Firefox 3
-
- 帖子: 955
- 注册时间: 2006-12-18 17:04
- 来自: 福建泉州
- Jimmy.Zhou
- 帖子: 475
- 注册时间: 2006-12-05 21:51
- 来自: Vienna, Austria
- eexpress
- 帖子: 58428
- 注册时间: 2005-08-14 21:55
- 来自: 长沙
简单得死的事情。
RENAME(1) Perl Programmers Reference Guide RENAME(1)
NAME
rename - renames multiple files
SYNOPSIS
rename [ -v ] [ -n ] [ -f ] perlexpr [ files ]
DESCRIPTION
"rename" renames the filenames supplied according to the rule specified
as the first argument. The perlexpr argument is a Perl expression
which is expected to modify the $_ string in Perl for at least some of
the filenames specified. If a given filename is not modified by the
expression, it will not be renamed. If no filenames are given on the
command line, filenames will be read via standard input.
For example, to rename all files matching "*.bak" to strip the exten‐
sion, you might say
rename ’s/\.bak$//’ *.bak
To translate uppercase names to lower, you’d use
NAME
rename - renames multiple files
SYNOPSIS
rename [ -v ] [ -n ] [ -f ] perlexpr [ files ]
DESCRIPTION
"rename" renames the filenames supplied according to the rule specified
as the first argument. The perlexpr argument is a Perl expression
which is expected to modify the $_ string in Perl for at least some of
the filenames specified. If a given filename is not modified by the
expression, it will not be renamed. If no filenames are given on the
command line, filenames will be read via standard input.
For example, to rename all files matching "*.bak" to strip the exten‐
sion, you might say
rename ’s/\.bak$//’ *.bak
To translate uppercase names to lower, you’d use
● 鸣学
-
- 帖子: 75
- 注册时间: 2007-02-06 21:58
Re: 简单得死的事情。
谢谢,rename 很好用!!!!eexpress 写了:RENAME(1) Perl Programmers Reference Guide RENAME(1)
NAME
rename - renames multiple files
SYNOPSIS
rename [ -v ] [ -n ] [ -f ] perlexpr [ files ]
DESCRIPTION
"rename" renames the filenames supplied according to the rule specified
as the first argument. The perlexpr argument is a Perl expression
which is expected to modify the $_ string in Perl for at least some of
the filenames specified. If a given filename is not modified by the
expression, it will not be renamed. If no filenames are given on the
command line, filenames will be read via standard input.
For example, to rename all files matching "*.bak" to strip the exten‐
sion, you might say
rename ’s/\.bak$//’ *.bak
To translate uppercase names to lower, you’d use