rename不能使用
Tofloor
poster avatar
learner
deepin
2017-08-22 01:52
Author
deepin怎么批量重命名,rename命令不能用啊
Reply Favorite View the author
All Replies
avatar
134******40
deepin
2017-08-22 02:34
#1
  1. $which rename
  2. /usr/bin/rename
Copy the Code

rename这命令有啊。你怎么不能用的?
Reply View the author
avatar
learner
deepin
2017-08-22 02:44
#2
Deprecated program in use: rename as shipped with the Debian perl package will be removed after the release of stretch. Please install the separate 'rename' package which will provide the same command.
Usage: rename [-v] [-n] [-f] perlexpr [filenames]
Reply View the author
avatar
learner
deepin
2017-08-22 02:48
#3
https://bbs.deepin.org/post/144499
rename这命令有啊。你怎么不能用的?

就这段,看不懂啊
Reply View the author
avatar
134******40
deepin
2017-08-22 02:56
#4
https://bbs.deepin.org/post/144499
Deprecated program in use: rename as shipped with the Debian perl package will be removed after the  ...

是说以前版本的rename工具已经不推荐使用了,安装新版本的reanme工具。
  1. sudo apt install rename
Copy the Code

安装完成后,即可使用rename功能了。
Reply View the author
avatar
learner
deepin
2017-08-22 03:04
#5
https://bbs.deepin.org/post/144499
是说以前版本的rename工具已经不推荐使用了,安装新版本的reanme工具。

安装完成后,即可使用rename功能 ...

感谢大佬
Reply View the author
avatar
learner
deepin
2017-08-22 04:05
#6
https://bbs.deepin.org/post/144499
是说以前版本的rename工具已经不推荐使用了,安装新版本的reanme工具。

安装完成后,即可使用rename功能 ...

大佬,出现这种情况怎么办Substitution replacement not terminated at (user-supplied code).
Reply View the author
avatar
许自强
deepin
2017-08-22 06:19
#7
https://bbs.deepin.org/post/144499
大佬,出现这种情况怎么办Substitution replacement not terminated at (user-supplied code).
...

似乎是替换不成功的意思,要不试试先卸载再安装吧
Reply View the author
avatar
134******40
deepin
2017-08-22 17:35
#8
https://bbs.deepin.org/post/144499
大佬,出现这种情况怎么办Substitution replacement not terminated at (user-supplied code).
...

把你使用的替换命令粘贴到这里来,我怀疑是命令类似“/”你写成“//”了,我刚刚尝试,完全可以正常工作。没有出现这些问题。问题应该是出现在命令上。
Reply View the author
avatar
learner
deepin
2017-08-28 05:47
#9
https://bbs.deepin.org/post/144499
把你使用的替换命令粘贴到这里来,我怀疑是命令类似“/”你写成“//”了,我刚刚尝试,完全可以正常工作 ...

rename 's/.txt/.png' *.txt
rename 's/\.txt/.png' *.txt
Reply View the author
avatar
learner
deepin
2017-08-28 05:49
#10
https://bbs.deepin.org/post/144499
rename 's/.txt/.png' *.txt
rename 's/\.txt/.png' *.txt

好像是png后忘打/了
Reply View the author
avatar
134******40
deepin
2017-08-28 06:21
#11
https://bbs.deepin.org/post/144499
rename 's/.txt/.png' *.txt
rename 's/\.txt/.png' *.txt

你写错了。你应该这样写:
  1. rename 's/.txt/.png/' *.txt
Copy the Code

千万别省略了png后面的"/"
Reply View the author