1. use the mv command to rename a file or directory or move the file from one directory to another. This command is equivalent to the combination of The ren and move commands in the DOS system. The permission is granted to all users. 2. format: mv [options] source file or directory target file or directory 3. [options] main... 1. use the mv command to rename a file or directory or move the file from one directory to another. This command is equivalent to the combination of The ren and move commands in the DOS system. The permission is granted to all users. 2. the format is mv [options] source file or directory target file or directory 3. [options] main parameter-I: interactive operation. If the mv operation will overwrite the existing target file, the system will ask whether to rewrite the file and ask the user to answer "y" or "n" to avoid overwriting the file by mistake. -F: disable interactive operations. When an mv operation overwrites an existing target file, no indication is given. If this parameter is specified, the I parameter will no longer work. 4. the second parameter when the second parameter type is file, the mv command renames the file, which renames the given source file or directory to the given target file name. When the second parameter is an existing directory name, there may be multiple source files or directory parameters. the mv command moves the source files specified by each parameter to the target directory. When a file is moved across file systems, the mv copies the file first, and then deletes the original file. the link to the file will also be lost. 5. application instance (1) Move all files in/usr/udt to the current directory (use ". $ mv/usr/udt/* .(2 rename the test.txtfile as wbk.txt: $ mv test.txt wbk.txt (3) move the files in one sub-directory of the current directory to another sub-directory. mv file name/* Another Directory (4) move all files in the current folder to the upper-level directory mv *../
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service