Rename file with command line
来源:互联网 发布:h3c路由器端口ip设置 编辑:程序博客网 时间:2024/06/01 08:59
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~
- Rename file with command line
- 3: Change File Permissions(Challenge: Working with the Command Line)
- ExecuteProcess - with Command Line Support
- How to import LDIF file into LDAP server with command line
- Command line error D8045 : cannot compile C file * with the /clr optioncl
- rename command
- 1: Command Line Python(Challenge: Working with the Command Line)
- open .dmg file from command line
- IDl save the command line to file
- Mysql Linux Command line Import .sql File
- Control your scripts with command-line PHP
- [VBS] Working with DOS Command Line
- File rename
- Reading and modify OS X plist file by command line
- 8: Importing A File(Command line Python scripting)
- command line
- command line
- command line
- 横竖屏相关
- 第5章 开始Unity Shader 学习之旅
- Hadoop_HA原理
- Android 使用Fragment,ViewPagerIndicator 制作csdn app主要框架
- 【转】ShuffleNet
- Rename file with command line
- Check Point SMB 操作手册
- NOVA V3 API Extension
- 部署和访问HTTP接口
- nginx 负载均衡的几种方式
- 判断javaScript中对象类型的方法
- springBoot--properties配置
- Z-stack中端点的作用
- java环境下fastjson 数据解析过程