得到的Perl命名效用,而不是内置的重命名 [英] Get the Perl rename utility instead of the built-in rename

查看:140
本文介绍了得到的Perl命名效用,而不是内置的重命名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

许多网站(包括各种文章SO)谈论使用重命名使用Perl前pressions重命名文件。

Many sites (including various SO articles) talk about using "rename" using Perl expressions to rename files.

这将是完美的,但显然这不是重命名工具我有,没有这些文章似乎COM prehend有的重命名多个版本,我似乎无法找到在哪里得到接受的Perl前pressions版本。

This would be perfect, but apparently this is not the rename utility I have, and none of these articles seem to comprehend that there are multiple versions of "rename" and I can't seem to find where to get version that accepts Perl expressions.

我怎样才能得到我的手更强大的重命名工具这里提到 这里和的这里

How can I get my hands on the more powerful rename utility mentioned here, here, and here?

我运行Fedora 20,我现在重命名命令从的util-linux的包,显然我需要的Perl版本,这是更好的。

I'm running Fedora 20. My current rename command is from the util-linux package and apparently I need the Perl version, which is better.

推荐答案

我只能说为Debian。这两个项目被称为

I can only speak for Debian. The two programs are called


  • /usr/bin/rename.ul 的util-linux的封装(因此.UL后缀)

  • 的/ usr / bin中/ preNAME perl的

  • /usr/bin/rename.ul from the util-linux package (hence the .ul suffix)
  • /usr/bin/prename from the perl package

实际改名通过了命令作品的/ etc /替代品机制,即


  • 的/ usr / bin中/重命名是一个符号链接的/ etc /替代品/重命名

  • 的/ etc /替代品/重命名是一个符号链接的/ usr / bin中/ preNAME

  • /usr/bin/rename is a symlink to /etc/alternatives/rename
  • /etc/alternatives/rename is a symlink to /usr/bin/prename

同样的问题一直缠着我在Cygwin,这是红帽的产品,所以应该更类似于Fedora的。我必须对我公司的笔记本电脑在周一的样子。我记得有有时在那里工作的Perl的重命名。也许之前我安装的util-linux的

The same problem has been bugging me on Cygwin, which is a Red Hat product, so should be more similar to Fedora. I'll have a look on my company laptop on Monday. And I remember the Perl-rename having worked there sometimes. Probably before I installed util-linux.

如果你安装Perl的重命名为的/ usr / local / bin目录将有超过 precedence重命名的util-linux的。安装时要同去的联机帮助页的/ usr /本地/共享/人/男1 /

If you install the Perl-rename to /usr/local/bin it will have precedence over rename from util-linux. Same goes for the manpage when installed to /usr/local/share/man/man1/.

我刚刚创建在Github上一个单独的Perl的重命名包: https://github.com/subogero/重命名

I've just created a separate Perl-rename package on Github: https://github.com/subogero/rename

这篇关于得到的Perl命名效用,而不是内置的重命名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆