In Linux systems, files can be renamed through the mv command or its alias ren command. A file can be renamed to a new name using the syntax "mv oldfilename newfilename". You can also use wildcards to rename multiple files in batches, or move files to another directory and rename them simultaneously.
How to change the file name in Linux system
In Linux system, you can use the following command to modify the file Name:
mvCommand
mv command is used to move or rename files. To rename a file, use the following syntax:
mv 旧文件名 新文件名
For example, to rename the file "oldfile.txt" to "newfile.txt", use the following command:
mv oldfile.txt newfile.txt
Note:If the new file name already exists, the mv command will overwrite the file.
renCommand
The ren command is an alias of the mv command and can also be used to rename files. The syntax is the same as the mv command.
Additional Tip:
mv *.txt *.md
mv myfile.txt /home/user/Documents/newfile.txt
The above is the detailed content of How to change the name of basic operating commands in Linux system. For more information, please follow other related articles on the PHP Chinese website!