YouTip LogoYouTip

Linux Comm Mcopy

# Linux mcopy command [![Image 3: Linux Command Manual](#) Linux Command Manual](#) The Linux mcopy command is used to copy MSDOS format files to Linux, or to copy MSDOS files from Linux to a floppy disk. mcopy can copy a single file to a specified filename, or copy multiple files to a specified directory. The source and destination files can be either MSDOS or Linux files. The mcopy command is a mtools tool command that can copy files within a DOS system or copy files between DOS and Linux operating systems. ### Syntax mcopy [-bnmpQt/] **Parameters**: * b Batch mode. This option is optimized for copying a large number of files, but there is a security issue if a crash occurs during the file copy process. / Recursive copy. Includes files in the directory and all files in its subdirectories. * -n Overwrite other files without confirmation. * m Set the modification time of the source file to the modification time of the destination file. * p Set the attributes of the source file to the attributes of the destination file. * Q Terminate the program as soon as possible when an error occurs while copying multiple files. * t Convert to a text file. * o Do not display a warning message when overwriting an MSDOS file. ### Examples Copy autoexec.bat from the root directory of drive A to the current working directory: mcopy a:autoexec.bat . When the copy includes subdirectories and files, you must use the "-/" parameter for recursive operation, so the command is: mcopy -/ A:* Before executing this command, use the mdir command to view the original directory structure. After executing mcopy, you can use the ls command to view the file structure in the Linux system after copying. The results are as follows: cmd@cmd-desktop:~$ mdir -/ a:* #View files on drive A Volume in drive A has no label #Mount information Volume Serial Number is 13D2~055C Directory for A:/ #Below is the directory information #Filename Directory Size Modification Time ./TEST 2009-09-23 16:59 AUTORUN.INF 265 2009-09-23 16:53 AUTORUN.BAT 43 2009-09-23 16:56 3 files 308 bytes #Total size 724 325 bytes free #Free space cmd@cmd-desktop:~$ mcopy -/ A:* #SetACopy all files on the disk to the current working directory cmd@cmd-desktop:~$ls TEST AUTORUN.INF AUTORUN.BAT #ACopy the contents of the disk into the Linux file system structure [![Image 4: Linux Command Manual](#) Linux Command Manual](#)
← Linux Comm MshowfatLinux Comm Cp β†’