How to use the Linux mcopy command

Source: Internet
Author: User

Mcopy can copy a single file to the specified file name, or copy several files to the specified directory. The source and target files can be MSDOS or Linux files.

The mcopy command is an mtools tool command that can copy files in the DOS system or between the DOS and Linux operating systems.

Syntax

Mcopy [-bnmpQt/] [source file] [target file or directory]

Parameters:

  • B batch processing mode. This is an optimized option for copying a large number of files. However, when a crash occurs during File copying, security issues may occur. /Progressive replication. Contains the files contained in the directory and all the files in its subdirectories.

  • -N directly overwrites other files without confirmation.

  • M sets the source file modification time to the modification time of the target file.

  • P sets the attribute of the source file as the attribute of the target file.

  • Q When an error occurs when copying multiple files, end the program as soon as possible.

  • T is converted to a text file.

  • O no warning message is displayed when the MSDOS file is overwritten.


Instance

Copy autoexec. bat in the root directory of disk A to the current working directory:

Mcopy a: autoexec. bat.

When the copied content includes sub-directories and files, the parameter "-/" must be used for recursion. Therefore, the command is:

Mcopy-/:\*

Run the mdir command to view the original directory structure. After mcopy is executed, run the ls command to view the file structure in Linux. The result is as follows:

Cmd @ cmd-desktop :~ $ Mdir-/a: \ * # View files in disk
Volume in drive A has no label # load information
Volume Serial Number is 13D2 ~ 055C
Directory for A: // # Directory information
# File name directory size modification time
./TEST2009-09-23 16: 59

AUTORUN. INF 265

AUTORUN. BAT 43

3 files 308 bytes # Total statistics size

724 325 bytes free # available space

Cmd @ cmd-desktop :~ $ Mcopy-/A: \ * # Copy all files on disk A to the current working directory.

Cmd @ cmd-desktop :~ $ Ls

Test autorun. inf autorun. BAT # copy the content in disk A to the Linux file system structure


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.