rename在man中的解释为:

NAME
rename - rename files SYNOPSIS
rename [options] expression replacement file... DESCRIPTION
rename will rename the specified files by replacing the first occurrence of expression in their name by replacement. OPTIONS
-v, --verbose
Give visual feedback which files where renamed, if any. -V, --version
Display version information and exit. -s, --symlink
Peform rename on symlink target -h, --help
Display help text and exit. EXAMPLES
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. WARNING
The renaming has no safeguards. If the user has permission to rewrite file names, the command will perform the action without any questions. For example,
the result can be quite drastic when the command is run as root in the /lib directory. Always make a backup before running the command, unless you truly
know what you are doing. SEE ALSO
mmv(1), mv(1)

其参数为三个,而不是两个

mv指令也可以更改文件名,但是只能一个一个更改

rename命令提供了批量更改的渠道

用法如下:

比如一个文件夹下有如下文件

20190328. 20190329. 20190330. 20190331. 20190401. 20190402. 20190403. 20190404. 20190405. 20190406. 20190407. 20190408. 20190409.

我要把每个文件后面的“.”置换成“.txt”则只需执行如下命令

rename . .txt *.

这样就 okl

“*”是通配符,还有“?”是代表一个字符

希望对大家有所帮助

以上

linux_rename命令用法的更多相关文章

  1. systemctl命令用法详解

    systemctl命令用法详解系统环境:Fedora 16binpath:/bin/systemctlpackage:systemd-units systemctl enable httpd.serv ...

  2. cpio命令用法

    [转自]流浪妖精のSKY    http://www.cnitblog.com/flutist1225/articles/18974.html cpio命令用法 cpio命令     利用cpio 可 ...

  3. shutdown命令用法

    首先我们先创建一个txt文件,添加shutdown -r -f -t 0 ,文件点击另存为,选择所有类型,保存格式为“重启.bat”文件. 说明:shutdown命令用法: /r         关闭 ...

  4. linux中comm命令用法

    linux系统中comm命令用法详解 linux系统下的comm命令是一个非常实用的文件对比命令. comm命令功能:   选择或拒绝两个已排序的文件的公共的行. comm命令语法:comm [-12 ...

  5. Ubuntu kill命令用法详解

    转自:Ubuntu kill命令用法详解 1. kill   作用:根据进程号杀死进程   用法: kill [信号代码] 进程ID   root@fcola:/# ps -ef | grep sen ...

  6. install 命令用法详解

    install 命令用法详解 http://man.linuxde.net/install install命令的作用是安装或升级软件或备份数据,它的使用权限是所有用户.install命令和cp命令类似 ...

  7. which、whereis、locate、find 命令用法

    which.whereis.locate.find 命令用法   大部分转自http://312788172.iteye.com/blog/730280,有修改 我们经常在linux要查找某个文件,但 ...

  8. sed命令用法详解

    sed命令用法 sed是一种流编辑器,它是文本处理中非常有用的工具,能够完美的配合正则表达式使用,功能不同凡响.处理时,把当前处理的行存储在临时缓冲区中,称为『模式空间』(pattern space) ...

  9. linux的strace命令用法

    strace命令用法 调用:strace [ -dffhiqrtttTvxx ] [ -acolumn ] [ -eexpr ] …[ -ofile ] [ -ppid ] … [ -sstrsize ...

随机推荐

  1. Linux 修改时区

    CentOS 7修改方式如下: # lsb_release -a  --查看系统版本-CentOS Linux release 7.6 # timedatectl     --查看当前系统时区# ls ...

  2. (原)netbeans中添加anaconda3安装的opencv

    转载请注明出处: https://www.cnblogs.com/darkknightzh/p/9974310.html 新装了ubuntu16.04后,直接安装了anaconda3,调试c++程序时 ...

  3. 构建自己的 Smart Life 私有云(二)-> 连通 IFTTT & Slack

    博客搬迁至https://blog.wangjiegulu.com RSS订阅:https://blog.wangjiegulu.com/feed.xml 原文链接:https://blog.wang ...

  4. [CI]jenkins安装&插件管理&java-helloworld之旅

    持续集成概述 没有持续集成时的情况 持续集成最佳实战 维护一个单一的代码库 使构建自动化 执行测试是构建的一部分 集成日志及历史记录 使用统一的依赖包管理库 每天至少集成一次 jenkins实现持续集 ...

  5. InputStream为什么不能被重复读取?

    最近上传阿里云的时候同一个文件上传两个服务地址,第一个文件读取以后第二个再去读取就拿不到了.代码如下: //内网上传OSS获取key值 String ossKey = OSSClientUtil.ge ...

  6. 【iCore1S 双核心板_ARM】例程二十:UART_IAP_ARM实验——更新升级STM32

    实验现象及操作说明: 1.本例程共有两个代码包,APP和IAP,IAP程序功能实现将APP程序升级至STM32中. 2.直接上电或烧写程序将执行升级的APP应用程序. BIN升级文件产生方法: 1.编 ...

  7. Houdini技术体系 基础管线(四) :Houdini驱动的UE4植被系统 下篇

    背景 在上篇中,实现了使用Houdini在UE4里根据地形过程生成植被的最基本的原型.并且支持把植被在UE4里Bake成使用的HierarchicalInstancedStaticMeshCompon ...

  8. GDC2017【神秘海域 4】中所使用的顶点着色器技术

    原文链接 http://game.watch.impress.co.jp/docs/news/1047802.html   会場:San Francisco Moscone Convention Ce ...

  9. 群晖搭建webssh

    拷贝工程到系统根,然后需要赋予权限 sudo chmod 777 -R WebSSH2/ git clone https://github.com/zhaocundang/WebSSH2.git de ...

  10. 让mysql 支持 emoji 表情

    1.数据库配置 [client] default-character-set = utf8mb4 [mysql] default-character-set = utf8mb4 [mysqld] ch ...