copy (command)

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search

copy
DevelopersDEC, Intel, MetaComCo, Heath Company, Zilog, Microware, HP, Microsoft, IBM, DR, TSL, Datalight, Novell, Toshiba
Repository
  • {{URL|example.com|optional display text}}Lua error in Module:EditAtWikidata at line 29: attempt to index field 'wikibase' (a nil value).
Engine
    Lua error in Module:EditAtWikidata at line 29: attempt to index field 'wikibase' (a nil value).
    Operating systemRT-11, OS/8, RSX-11, ISIS-II, iRMX 86, TOPS-10, TOPS-20, OpenVMS, TRIPOS, HDOS, DOS, MSX-DOS, FlexOS, 4680 OS, 4690 OS, PC-MOS, Z80-RIO, OS-9, MPE/iX, OS/2, Windows, ReactOS, SymbOS, DexOS
    TypeCommand
    LicenseHDOS: PD
    MS-DOS: MIT
    PC-MOS: GPL v3
    ReactOS: GPL v2

    copy is a shell command for copying files.[1][2]

    Different implementations provide various capabilities, such as:

    • Combining (concatenating) multiple files into a single file
    • If multiple source files are specified before the path to an existing directory, then files are copied to the directory
    • Support for text vs. binary data; for text, the command stops when it reaches an end-of-file (EOF) character; for binary, files are copied in their entirety, ignoring EOF
    • In DOS, a file can be copied to or from a device. For example, copy path con outputs the file at path to the console, and copy con path copies text typed at the console to a file at path

    Implementations

    [edit | edit source]

    The command is available in RT-11,[3] OS/8,[4] RSX-11,[5] ISIS-II,[6] iRMX 86,[7] TOPS-10,[8] TOPS-20,[9] OpenVMS,[10] MetaComCo TRIPOS,[11] HDOS,[12] Z80-RIO,[13] OS-9,[14] DOS, FlexOS,[15] 4690 OS,[16] PC-MOS,[17] HP MPE/iX,[18] OS/2,[19] Windows,[20] ROM-DOS,[21] ReactOS,[22] SymbOS, DexOS, and 86-DOS.[23]

    Under IBM PC DOS/MS-DOS the command is available since version 1.[24]

    Some shells provide a copy command with a different name. In Unix-based systems, the copy command is cp. In CP/M, the command is PIP. in OpenVOS, the command is copy_file.[25]

    The following copies existing file fromfile to path tofile.

    copy fromfile tofile
    

    A file can be copied to a device. The following sends a file to the printer on lpt1.

    copy letter.txt lpt1
    

    The following outputs to stdout, like the type command.

    copy letter.txt con
    

    The following concatenates the page# files into book.txt – like cat.

    copy page1.txt+page2.txt book.txt 
    

    The command can copy files between drives.

    The following uses text mode to copy text of the file, stopping when it reaches an EOF character.

    copy /a doc1.txt + doc2.txt doc3.txt
    copy /a *.txt doc3.txt
    

    The following uses binary mode, concatenating files in their entirety and ignoring EOF characters.

    copy /b image1.jpg + image2.jpg image3.jpg
    

    See also

    [edit | edit source]
    • XCOPY – Shell command for copying files

    References

    [edit | edit source]
    1. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    2. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    3. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    4. ^ "Concise Command Language" (CCL).Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    5. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    6. ^ ISIS II Users Guide
    7. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    8. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    9. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    10. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).[permanent dead link]
    11. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    12. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    13. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    14. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    15. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    16. ^ [1][dead link]
    17. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    18. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    19. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    20. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    21. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    22. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    23. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value). (59 pages)
    24. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    25. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).

    Further reading

    [edit | edit source]
    • Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    • Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    • Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    [edit | edit source]