linux_rename命令用法
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命令用法的更多相关文章
- systemctl命令用法详解
systemctl命令用法详解系统环境:Fedora 16binpath:/bin/systemctlpackage:systemd-units systemctl enable httpd.serv ...
- cpio命令用法
[转自]流浪妖精のSKY http://www.cnitblog.com/flutist1225/articles/18974.html cpio命令用法 cpio命令 利用cpio 可 ...
- shutdown命令用法
首先我们先创建一个txt文件,添加shutdown -r -f -t 0 ,文件点击另存为,选择所有类型,保存格式为“重启.bat”文件. 说明:shutdown命令用法: /r 关闭 ...
- linux中comm命令用法
linux系统中comm命令用法详解 linux系统下的comm命令是一个非常实用的文件对比命令. comm命令功能: 选择或拒绝两个已排序的文件的公共的行. comm命令语法:comm [-12 ...
- Ubuntu kill命令用法详解
转自:Ubuntu kill命令用法详解 1. kill 作用:根据进程号杀死进程 用法: kill [信号代码] 进程ID root@fcola:/# ps -ef | grep sen ...
- install 命令用法详解
install 命令用法详解 http://man.linuxde.net/install install命令的作用是安装或升级软件或备份数据,它的使用权限是所有用户.install命令和cp命令类似 ...
- which、whereis、locate、find 命令用法
which.whereis.locate.find 命令用法 大部分转自http://312788172.iteye.com/blog/730280,有修改 我们经常在linux要查找某个文件,但 ...
- sed命令用法详解
sed命令用法 sed是一种流编辑器,它是文本处理中非常有用的工具,能够完美的配合正则表达式使用,功能不同凡响.处理时,把当前处理的行存储在临时缓冲区中,称为『模式空间』(pattern space) ...
- linux的strace命令用法
strace命令用法 调用:strace [ -dffhiqrtttTvxx ] [ -acolumn ] [ -eexpr ] …[ -ofile ] [ -ppid ] … [ -sstrsize ...
随机推荐
- 数据库的范式,第一、二、三、四、五范式、BC范式
数据库的规范化(上一篇博客有写到)的程度不同,便有了这么多种范式.数据库范式是数据库设计必不可少的知识,没有对范式的理解,就无法设计出高效率.优雅的数据库,甚至设计出错误误的数据库.课本中的定义比较抽 ...
- reStructuredText语法简单说明
reStructuredText 是扩展名为.rst的纯文本文件,含义为"重新构建的文本"",也被简称为:RST或reST. 官方网址: http://docutils. ...
- assert BOOST_ASSERT的坑
下面这行代码 BOOST_ASSERT(SUCCEEDED(m_pd3dDevice->CreateBuffer(&frame_ptr->m_const_buffers[i].m_ ...
- CentOS 7.4安装nodejs & nginx & pm2
一.安装nodejs1.查看操作系统信息 uname -a cat /etc/centos-release 2.安装wget yum install wget -y3.安装nodejs 1.下载 wg ...
- mysql 动态增加列,查找表中有多少列,具体什么列。 通过JSON生成mysql表 支持子JSON
好消息, 程序员专用早餐机.和掌柜说 ideaam,可以节省20元. 点击链接 或復·制这段描述¥k3MbbVKccMU¥后到淘♂寳♀ 或者 淘宝扫码 支持下同行哈 ---------------- ...
- Atitit 押金危机 如何防止用户挤兑
Atitit 押金危机 如何防止用户挤兑 1.1. 用户的押金一定要及时退还,最好实时,避免用户恐慌导致挤兑.. 1 1.2. 退押金有手续费怎么办,最好和用户说明,从用户手机扣缴..不要因小失大.. ...
- vue中如何动态的绑定图片,vue中通过data返回图片路径
在项目中遇到需要动态的改变图片路径,图片路径并非是从后台获取过来的数据. 因此在data中必须用require加载,否则会当成字符串来处理. 效果:
- iScroll的使用
CDN: <script src="//ossweb-img.qq.com/images/js/iscroll_library/iscroll-5.2.0.js">&l ...
- maven私服不能重复部署解决
1.报错 Return code is: 400, ReasonPhrase: Repository does not allow updating assets: maven-releases. 2 ...
- [转]tableExport.js 导出excel 如果有负数或是空值 导出前面会自动加上单引号
原文地址:https://blog.csdn.net/private66/article/details/88718285 tableExport.js 导出excel 如果有负数或是空值 导出前 ...