In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
Most people do not understand the knowledge of this article "how to use the mv command of Linux", so the editor summarizes the following content, detailed content, clear steps, and has a certain reference value. I hope you can get something after reading this article. Let's take a look at this "how to use the mv command of Linux" article.
The Linux common command mv command is used to rename or move a file or directory to another location.
Syntax mv [options] source dest mv [options] source... Directory parameter description:
-b: when the destination file or directory exists, a backup is created for it before the overwrite is performed.
-I: if you specify that the source directory or file to be moved has the same name as the destination directory or file, you will first ask whether to overwrite the old file, enter y to directly overwrite, and enter n to cancel the operation.
-f: if you specify that the source directory or file to be moved has the same name as the destination directory or file, it will not be asked, and the old file will be overwritten directly.
-n: do not overwrite any existing files or directories.
-u: the move operation is performed only when the source file is newer than the target file or when the target file does not exist.
Mv parameter setting and running result
Command format run result mv source_file (file) dest_file (file) change source file name source_file to destination file name dest_filemv source_file (file) dest_directory (directory) move file source_file to destination directory dest_directory mv source_directory (directory) dest_directory (directory) directory name dest_directory already exists, move source_directory to directory name dest_directory If the directory name dest_directory does not exist, source_directory is renamed to directory name dest_directorymv source_directory (directory) dest_file (file) error displaying details
For example, rename the file aaa to bbb:
Mv aaa bbb places the info directory in the logs directory. Note that if the logs directory does not exist, the command renames info to logs.
Mv info/ logs, for example, move all files and directories under / usr/runoob to the current directory, command behavior:
$mv / usr/runoob/*. The above is about the content of this article on "how to use the mv command of Linux". I believe we all have a certain understanding. I hope the content shared by the editor will be helpful to you. If you want to know more about the relevant knowledge, please follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.