**linux Utility Commands How to move folders and files under All files

Source: Internet
Author: User

Http://www.linuxde.net/2013/02/12448.html

Format:

MV [option] source file or directory destination file or directory

Use the command:

MV  WebData  /bin/usr/

Can be extended:

MV    /usr/lib/*    /zone

is to move everything under the/usr/lib/to the/zone/.

MV    /usr/lib/*.txt    /zone

is to move all files under Lib to the end of TXT to/zone. Other types, and so on.

Specify the following:

Role

MV command to rename a file or directory or to move a file from one directory to another. This command is equivalent to the combination of the Ren and move commands under the DOS system. Its use rights are for all users.

Format

MV [options] source file or directory destination file or directory

[Options] Main parameters (several important parameters)

    • -I: Interactive mode operation. If the MV operation will result in overwriting an existing target file, then the system asks whether to overwrite it, asking the user to answer "y" or "n", which avoids overwriting the file by mistake.
    • -F: Disables interactive operation. MV operation to overwrite an existing target file without giving any indication, after specifying this parameter the I parameter will no longer work. -R instructs the MV to move all directories and subdirectories listed in the parameter recursively.

A second parameter

    • When the second parameter type is a file, the MV command completes the file rename, which renames the given source file or directory to the specified destination file name.
    • When the second parameter is a directory name that already exists, the source file or directory parameter can have more than one, and the MV command moves the source files specified by each parameter to the destination directory. When you move a file across a file system, the MV copies the original file, and the link to the file is lost.

**linux Utility Commands How to move folders and files under All files

Related Article

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.