Home > Operation and Maintenance > Linux Operation and Maintenance > How to rename files and folders in linux

How to rename files and folders in linux

王林
Release: 2020-05-25 14:08:50
Original
13107 people have browsed it

How to rename files and folders in linux

Linux renaming files and folders can be achieved using the mv command.

mv command:

Linux mv command is used to rename files or directories, or move files or directories to other locations.

Example:

For example: before.txt is the file name before modification, and after.txt is the file name to be modified.

The command is:

mv before.txt after.txt
Copy after login

Note: If there is an after.txt file in the current directory, our file will overwrite it.

The mv command can also move files and folders, for example, move the /a directory to /b and rename it to c.

The command is:

mv /a /b/c
Copy after login

Recommended tutorial: linux tutorial

The above is the detailed content of How to rename files and folders in linux. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template