Misplaced Pages

copy (command)

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.
(Redirected from COPY (command)) Computer command in various operating systems For the command for copying with the clipboard, see Cut, copy, and paste.

copy
The ReactOS copy command
Developer(s)DEC, Intel, MetaComCo, Heath Company, Zilog, Microware, HP, Microsoft, IBM, DR, TSL, Datalight, Novell, Toshiba
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

In computing, copy is a command in various operating systems. The command copies computer files from one directory to another.

Overview

Generally, the command copies files from one location to another. It is used to make copies of existing files, but can also be used to combine (concatenate) multiple files into target files. The destination defaults to the current working directory. If multiple source files are indicated, the destination must be a directory, or an error will result. The command can copy in text mode or binary mode; in text mode, copy will stop when it reaches the EOF character; in binary mode, the files will be concatenated in their entirety, ignoring EOF characters.

Files may be copied to devices. For example, copy file con outputs file to the screen console. Devices themselves may be copied to a destination file, for example, copy con file takes the text typed into the console and puts it into FILE, stopping when EOF (Ctrl+Z) is typed.

Implementations

The command is available in DEC RT-11, OS/8, RSX-11, Intel ISIS-II, iRMX 86, DEC TOPS-10, TOPS-20, OpenVMS, MetaComCo TRIPOS, Heath Company HDOS, Zilog Z80-RIO, Microware OS-9, DOS, DR FlexOS, IBM/Toshiba 4690 OS, TSL PC-MOS, HP MPE/iX, IBM OS/2, Microsoft Windows, Datalight ROM-DOS, ReactOS, SymbOS and DexOS.

The copy command is supported by Tim Paterson's SCP 86-DOS. Under IBM PC DOS/MS-DOS it is available since version 1. A more advanced copy command is called xcopy.

The equivalent Unix command is cp, the CP/M command is PIP. The command is analogous to the Stratus OpenVOS copy_file command.

Example for DOS

copy letter.txt 

Files may be copied to device files (e.g. copy letter.txt lpt1 sends the file to the printer on lpt1. copy letter.txt con would output to stdout, like the type command. Note that copy page1.txt+page2.txt book.txt will concatenate the files and output them as book.txt. Which is just like the cat command). It can also copy files between different disk drives.

There are two command-line switches to modify the behaviour when concatenating files:

  • Text mode - This copies the text content of the file, stopping when it reaches the EOF character.
copy /a doc1.txt + doc2.txt doc3.txt
copy /a *.txt doc3.txt
  • Binary mode - This concatenates files in their entirety, ignoring EOF characters.
copy /b image1.jpg + image2.jpg image3.jpg

See also

References

  1. "Microsoft TechNet Copy article". 2009-09-11.
  2. Rügheimer, Hannes; Spanik, Christian (1988-09-14). AmigaDOS quick reference. Grand Rapids, Mi : Abacus. ISBN 9781557550491 – via Internet Archive.
  3. "RT-11 HELP FILE". paleoferrosaurus.com. Archived from the original on 2018-07-17. Retrieved 2019-07-06.
  4. "Concise Command Language" (CCL)."OS/8 Handbook" (PDF). April 1974. Retrieved 2017-11-28.
  5. John F. Pieper (1987). RSX A Guide for Users (PDF). Digital Equipment Corporation. ISBN 0-932376-90-8. Retrieved 2020-09-19.
  6. ISIS II Users Guide
  7. "intel :: iRMX :: 146194-001 irmxR6Intro" – via Internet Archive.
  8. TOPS-10 Operating System Commands Manual (PDF). Digital Equipment Corporation. August 1980. Archived from the original (PDF) on 2020-08-09. Retrieved 2019-02-17.
  9. "TOPS-20 Command manual" (PDF). Archived from the original (PDF) on 2020-08-09. Retrieved 2018-07-18.
  10. "OpenVMS User's Manual". www.itec.suny.edu.
  11. "Operating manual" (PDF). www.pagetable.com. Retrieved 2020-09-14.
  12. Heath Company. "Software Reference Manual HDOS SYSTEM Chapter 2 General Operations" (PDF). Archived from the original (PDF) on 2017-08-07. Retrieved 2020-02-08.
  13. Z80-RIO OPERATING SYSTEM USER'S MANUAL
  14. Paul S. Dayan (1992). The OS-9 Guru - 1 : The Facts. Galactic Industrial Limited. ISBN 0-9519228-0-7.
  15. "FlexOS User's Guide" (PDF). www.bitsavers.org. 1986. Archived from the original (PDF) on 2010-08-08. Retrieved 2020-09-14.
  16. "roelandjansen/pcmos386v501". GitHub. 2022-01-02.
  17. "MPE/iX Command Reference Manual" (PDF). Archived from the original (PDF) on 2018-10-21. Retrieved 2018-10-21.
  18. "OS/2 Commands: Copy". Archived from the original on 2019-04-14. Retrieved 2019-07-20.
  19. "copy". docs.microsoft.com. 2023-02-03.
  20. "Datalight ROM-DOS User's Guide" (PDF). www.datalight.com.
  21. "reactos/reactos". GitHub. 2022-01-03.
  22. 86-DOS - Disk Operating System for the 8086 - User's Manual (PDF). Version 0.3 (Preliminary ed.). Seattle, Washington, USA: Seattle Computer Products, Inc. 1980. Archived from the original (PDF) on 2019-07-14. Retrieved 2019-07-14. (59 pages)
  23. Wolverton, Van (2003). Running MS-DOS Version 6.22 (20th Anniversary Edition), 6th Revised edition. Microsoft Press. ISBN 0-7356-1812-7.
  24. "OpenVOS Commands Reference Manual" (PDF). stratadoc.stratus.com. Retrieved 2020-09-14.

Further reading

External links

Windows command-line programs and shell builtins
File system navigation
File management
Archiving
Disk management
Processes
Registry
User environment
File contents
Scripting
Networking
Maintenance and care
Boot management
Software development
Miscellaneous
Categories: