You need to add "gt_" in front of the file names of all txt files in the folder; That is, the original file "xxx.txt" becomes "gt_xxx.txt": The script I searched online is as follows: for i in `ls`; do mv -f $i 'echo "gt_"$i`; done 1. First, switch the Linux command line to the directory where you need to modify the file name: cd destination directory 2. Create a new sh file in this directory: 3. Open the xxx.sh file: 3. Copy the script content just now to the sh file, save and exit Edit sh file: Shift+I Save and exit after pasting: Ctrl+Alt +D to exit the editing state, then enter :wq! to exit Execute sh file: ./xxx.sh I have never come across Linux commands before, and now I need to use some of them. I am taking this note as a reminder~~~ ps: Batch change file prefix command under linux for f in * ; do mv -- "$f" "PRE_$f" ; done Summarize The above is the operation method of adding file prefixes in batches in Linux introduced by the editor. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website! You may also be interested in:
|
<<: Vue uses v-model to encapsulate the entire process of el-pagination components
>>: Detailed graphic tutorial on installing and uninstalling Tomcat8 on Linux
Table of contents Preface know Practice makes per...
This article shares with you a draggable photo wa...
One-click execution To install Python 3.8 in a vi...
A Textbox with Dropdown allows users to select an...
What are the lifecycle functions of React compone...
The reason is that it was not uninstalled cleanly...
Table of contents Preface 1. Background 2. Simula...
Starting from MySQL 5.7, many security updates ha...
Table of contents 1. Environmental Preparation 2....
Operating system: windowns10_x64 Python version: ...
What is React React is a simple javascript UI lib...
Table of contents 1. How is cross-domain formed? ...
A web server can build multiple web sites with in...
Method 1: INSERT INTO t1(field1,field2) VALUE(v00...
useState useState adds some internal state to a c...