linux中文件重命名_如何在Linux中重命名多个文件?

linux中文件重命名

linux中文件重命名

Renaming multiple parts always seems a difficult job and renaming can be done only senior system administrator. Actually it is very easy as long as the situation is not so complex.

重命名多个部分总是很困难,重命名只能由高级系统管理员来完成。 实际上,只要情况不那么复杂,这是非常容易的。

重命名命令 (Rename Command)

Rename command will change files names according to the rules specified. Rename command also supports perlexpr. Rename is also known with rename.ul in some distributions but recently rename command can be used.

重命名命令将根据指定的规则更改文件名。 重命名命令还支持perlexpr。 在某些发行版中,Rename也以rename.ul闻名,但最近可以使用rename命令。

$ rename ".jpg" ".jpeg" "*.jpg"
  • Rename files specified *.jpg and change .jpg to the .jpeg

    重命名指定的文件* .jpg并将.jpg更改为。 jpeg

将大写文件名更改为小写 (Change Uppercase Filenames To Lowercase)

Another useful usage of rename is converting names to upper and lowercase we will see in this example how to convert uppercase to lowercase

重命名的另一个有用用法是将名称转换为大写和小写,在此示例中,我们将看到如何将大写转换为小写

$ rename 'y/A-Z/a-z/' *

将小写文件名更改为大写 (Change Lowercase File Names To Uppercase)

In contrast to the previous example, we will convert lowercase names to the uppercase during the rename operation.

与前面的示例相反,我们将在重命名操作期间将小写名称转换为大写。

$ rename 'y/a-z/A-Z/' *

使用MMV (Using Mmv)

mmvis another command used to move, copy, append and link multiple files with wildcard patterns. Mmv makes these operations safely without harming any files. Mmv supports big files but don does not support sparse files for append. mmv stands for Multi Move

mmv是另一个用于使用通配符模式移动,复制,附加和链接多个文件的命令。 Mmv可以安全地执行这些操作,而不会损坏任何文件。 MMV支持大文件,但不支持稀疏文件。 mmv代表Multi Move

$ mmv '*.jpeg' '#1.jpg'
  • *.jpeg is the files those  will be selected for rename

    * .jpeg是将要重命名的文件

  • #1 is the name part of the files select and do not includes the extension

    #1是文件选择的名称部分,不包含扩展名

  • .jpg is the extension will be added

    .jpg是扩展名

Using Mmv
Using Mmv
使用MMV
LEARN MORE  Linux mv Command Tutorial
了解更多Linux mv命令教程

翻译自: https://www.poftut.com/rename-multiple-files-linux/

linux中文件重命名

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值