Linux file/folder renaming

The mv command can both rename and move files or folders.

Example: Rename directory A to B
mv AB

Example: Move the /a directory to /b and rename it to c
mv /a /b/c

In fact, to rename a file or directory in text mode, you only need to use the mv command. For example, to rename a file named abc to 1234:
mv abc 1234

Note that if there is also a 1234 file in the current directory, this file will overwrite it.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324726094&siteId=291194637