Latest web development tutorials

Linux mcopy command

Linux mcopy command

Linux command Daquan Linux command Daquan

Linux mcopy command to copy a file to Linux MSDOS format, or copied from the Linux MSDOS file onto the diskette.

mcopy can copy a single file to the specified file name, or to copy several files into the directory specified. Source and destination file for MSDOS or Linux file.

mcopy mtools command is a command tool, you can copy files in DOS system or between DOS and Linux operating system file copy.

grammar

mcopy [-bnmpQt/][源文件][目标文件或目录]

Parameters:

  • b batch mode. This is a replication of the best options for a large number of files, but when copying files generated crash in the process, there will be security problems. / Recursive copy. Contained in the directory containing the file and all its subdirectories.
  • When -n cover other documents, it does not require confirmation direct coverage
  • m source file modification time is set to the modification time of the target file.
  • p the attributes of the source file to the target file attributes.
  • Q When copying multiple files generate an error, as soon as the program ends.
  • t is converted to text files.
  • o warning message will not appear in the cover MSDOS file.

Examples

A copy of the root directory of the current working directory autoexec.bat below:

mcopy a:autoexec.bat .

When you copy the contents including subdirectories and files, you must use the parameter "- /" recursive operations, so the command is:

mcopy -/ A:\* 

Before executing this command before using mdir command to check the original directory structure, after performing mcopy can use the ls command after copying the Linux system file structure with the following results:

cmd@cmd-desktop:~$ mdir -/ a:\* #查看A 盘中的文件  
Volume in drive A has no label #加载信息  
Volume Serial Number is 13D2~055C  
Directory for A:/ #以下为目录信息  
#文件名目录大小 修改时间  
./TEST <DIR> 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 #统计总大小  
724 325 bytes free #剩余空间  
cmd@cmd-desktop:~$ mcopy -/ A:\* #将A盘上的所有文件复制到当前工作目录  
cmd@cmd-desktop:~$ls  
TEST AUTORUN.INF AUTORUN.BAT #A盘中的内容复制到Linux文件系统结构中 

Linux command Daquan Linux command Daquan