当前位置:网站首页>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~
边栏推荐
- 一篇让你掌握线程和线程池,还解决了线程安全问题,确定不看看?
- An article allows you to master threads and thread pools, and also solves thread safety problems. Are you sure you want to take a look?
- Express get/post/delete... Request
- ipfs通过接口获得公钥、私钥,并加密存储。第一弹
- 专项测试之「 性能测试」总结
- kettle8.2 安装及常见问题
- Dynamic proxy
- There is a problem with the time zone when the idea connects to the database. The server returns invalid timezone is red Need to set ‘serverTimezone‘ property.
- C # one method returns multiple values. Suggestions collection
- 101. (cesium chapter) cesium particle system - snow
猜你喜欢

Unity display Kinect depth data

ES6 learning notes (1) - quick start

win10小技巧(1)——转移桌面位置

Selenium自动化测试面试题全家桶

I'm afraid I won't use the JMeter interface testing tool if I accept this practical case

Summary of "performance test" of special test

连续时间系统的性能分析(1)-控制系统性能指标及一二阶分析

An article allows you to master threads and thread pools, and also solves thread safety problems. Are you sure you want to take a look?

kettle JVM内存设置---效果不明显

收下这份实操案例,还怕不会用Jmeter接口测试工具
随机推荐
Kinect for Unity3D——BackgroundRemovalDemo学习
Introduction to assembly language (1)
换行问题双保险
asp.net 的经验
Extension of regular expression
js常用utils封装
2022备战秋招10W字面试小抄pdf版,附操作系统、计算机网络面试题
web UI 自动化测试:Selenium 语法详解 史上最全
进行接口测试时,连接数据库,对数据源进行备份、还原、验证操作
Electromagnetic field learning notes - vector analysis and field theory foundation
ipfs通过接口获得公钥、私钥,并加密存储。第一弹
利用 Fastjson json (简单粗暴版)
Nacos的基本使用(1)——入门
NPM basic use
IDEA成功连接Database但不显示表怎么办
Unity学习笔记——物体移动六种常见函数
又有一个Repeater的例子
Win10 tips (1) -- transfer desktop location
Study notes of Microcomputer Principles - general integer instructions and Applications
编程式跳转