How to rename a directory or a file


 description

Use mv to rename the file1.txt file to file2.txt, suitable for Linux

 command

mv file1.txt file2.txt

 parameter

mv [OPTION]... [-T] SOURCE DEST
or:  mv [OPTION]... SOURCE... DIRECTORY
or:  mv [OPTION]... -t DIRECTORY SOURCE...
Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY.

I hope to help every developer quickly find the commands they need. Of course, you can also add your own commonly used commands for easy searching.