当前位置:网站首页>Rename file with command line
Rename file with command line
2022-07-27 19:17:00 【BasilGuo】
Rename file with command line
1.mv
I just want to rename one file, so I use mv to modify the filename
mv oldfilename newfilename
If necessary, you can use with directory. Just like:
mv ~/Documents/test.txt ~/Documents/test/test.txt
2.rename
However, when the file is very big, mv can behavior efficiently or not is a question.So, I need another solution.
Thus, I surf the Internet and find that I can use rename to rename myfile.
The usage is:
rename [-h|-m|-V] [-v] [-n] [-f] [-e | -E perlexpr]* |perlexpr [ files]
-n: list the file will be renamed
-v: list the file has been renamed
Yeah, it is a Perl expression, but I just know regex a little.
For instance, I’d like to rename “first_shell.sh” to “first.sh”, I can write:
rename ‘s/first_shell/first/’ *.sh
You can use man rename in terminal for help.
Poor User Experience~
边栏推荐
- 【云图说】 第250期 初识华为云微服务引擎CSE
- Unity学习笔记(实现传送带)
- 搭建阿里云+typora+Picgo图床错误分析
- C#与Mysql数据库交互-Mysql配置及增删查改操作
- 2022 preparation for autumn recruitment 10W word interview sketch PDF version, with operating system and computer network interview questions
- PHP string operation
- Unity display Kinect depth data
- Unity learning notes (rigid body physics collider trigger)
- Useful resources for ns2
- 编程式跳转
猜你喜欢

Unity-显示Kinect深度数据

Kinect for Unity3d----KinectManager

Down sampling - signal phase and aliasing

MongoDB学习笔记(1)——安装MongoDB及其相关配置

一篇让你掌握线程和线程池,还解决了线程安全问题,确定不看看?

kettle 分列、合并记录

Mongodb learning notes (1) - install mongodb and its related configurations

大冤种们,新进测试行业,如何正确选择意向企业?

sql 字段类型转换

kettle学习——8.2版本的资源库配置变为灰色,且没有了Connect按钮
随机推荐
Questions about webservice
每日一题(02):倒置字符串
Some advice for NS2 beginner.
[Luogu p3175] bitwise OR (min max inclusive) (high-dimensional prefix and / FWT)
Kinect for Unity3d----KinectManager
ES6 new method
WSN Journal indexed by SCI(转)
Introduction to assembly language (1)
v-if,v-else,v-for
NPM, cnpm Taobao image
IDEA连接数据库时区问题,报红Server returns invalid timezone. Need to set ‘serverTimezone‘ property.
Selenium自动化测试面试题全家桶
Role authorization --- complete the addition and deletion of secondary menus by adding and deleting primary menus
Subscription and use of Alibaba cloud video on demand service
功率单位(power control)
Using functions to extract numbers from text strings in Excel
kettle入门级操作第一篇(读取excel、输出excel)
Micaz+tinyos learning notes (1)
101. (cesium chapter) cesium particle system - snow
Unity学习笔记(实现传送带)