What is the use of linux mv command

藏色散人
Release: 2020-10-22 10:19:37
Original
20769 people have browsed it

The linux mv command is the abbreviation of move, which can be used to move files or rename files. Its command format is "mv [option] source file or directory target file or directory".

What is the use of linux mv command

# Recommended: "

linux tutorial

The mv command is the abbreviation of move and can be used to move files or rename files (move (rename) files).

Command format

mv [选项] 源文件或目录 目标文件或目录
Copy after login


1. When the second parameter type (target) in the mv command is a file, realize **rename** the source file or The function of the directory, remember that there can only be one source file or directory, because if there are multiple, there will be naming conflicts.

What is the use of linux mv command
2. When the second parameter type (target) in the mv command is a directory,
movement is implemented Function of source files and directories. There can be multiple source files or directories. The mv command will move the source files or directories to the target directory.

What is the use of linux mv command 3.mv -b: Back up the file before overwriting it.

What is the use of linux mv command4.mv -f (force): When overwriting a file, overwrite it directly without asking:

What is the use of linux mv command5.mv -i: Before overwriting the file, it will Ask whether to overwrite:

What is the use of linux mv command6.mv -u: The target file can only be overwritten when the source file is the latest update.

What is the use of linux mv command7.mv -t: This method is suitable when multiple source files need to be moved. At this time,
the target directory is first and the source file is last

What is the use of linux mv command

The above is the detailed content of What is the use of linux mv command. 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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!