Software:copy (command)

From HandWiki

copy
ReactOS-0.4.13 copy command 667x434.png
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.[1][2]

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,[3] OS/8,[4] RSX-11,[5] Intel ISIS-II,[6] iRMX 86,[7] DEC TOPS-10,[8] TOPS-20,[9] OpenVMS,[10] MetaComCo TRIPOS,[11] Heath Company HDOS,[12] Zilog Z80-RIO,[13] Microware OS-9,[14] DOS, DR FlexOS,[15] IBM/Toshiba 4690 OS,[16] TSL PC-MOS,[17] HP MPE/iX,[18] IBM OS/2,[19] Microsoft Windows,[20] Datalight ROM-DOS,[21] ReactOS,[22] SymbOS and DexOS.

The copy command is supported by Tim Paterson's SCP 86-DOS.[23] Under IBM PC DOS/MS-DOS it is available since version 1.[24] 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.[25]

Example for DOS

copy letter.txt [destination]

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

  • XCOPY in DOS, OS/2, Windows etc.
  • cp (Unix)
  • Peripheral Interchange Program

References

  1. "Microsoft TechNet Copy article". 11 September 2009. https://technet.microsoft.com/en-us/library/bb490886.aspx. 
  2. Rügheimer, Hannes; Spanik, Christian (14 September 1988). AmigaDOS quick reference. Grand Rapids, Mi : Abacus. ISBN 9781557550491. https://archive.org/details/1988-rugheimer-spanik-amigados-quick-reference. 
  3. "RT-11 HELP FILE". http://paleoferrosaurus.com/beta/documents/rt11help.html#COPY. 
  4. "Concise Command Language" (CCL)."OS/8 Handbook". April 1974. http://bitsavers.trailing-edge.com/pdf/dec/pdp8/os8/OS8_Handbook_Apr1974.pdf. 
  5. John F. Pieper (1987). RSX A Guide for Users. Digital Equipment Corporation. ISBN 0-932376-90-8. http://www.rsx11m.com/rsxguide.pdf. Retrieved 2020-09-19. 
  6. ISIS II Users Guide
  7. "intel :: iRMX :: 146194-001 irmxR6Intro". https://archive.org/details/bitsavers_inteliRMX1_19819263. 
  8. TOPS-10 Operating System Commands Manual. Digital Equipment Corporation. August 1980. http://scandocs.trailing-edge.com/tops10-aa-0916d-tb.pdf. Retrieved 2019-02-17. 
  9. "TOPS-20 Command manual". http://www.textfiles.com/bitsavers/pdf/dec/pdp10/TOPS20/V6.1/AA-FP65A-TM_tops20CmdsRef.pdf. 
  10. "OpenVMS User's Manual". https://www.itec.suny.edu/scsys/vms/OVMSDOC073/v73/6489/6489pro_005.html. [yes|permanent dead link|dead link}}]
  11. "Operating manual". https://www.pagetable.com/docs/amigados_tripos/tripos_manuals.pdf. 
  12. Heath Company. "Software Reference Manual HDOS SYSTEM Chapter 2 General Operations" (in en). http://sebhc.lesbird.com/documentation/software/HDOS-2/HDOS_Reference_Chapter2.pdf. 
  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". 1986. http://www.bitsavers.org/pdf/digitalResearch/flexos/1073-2003_FlexOS_Users_Guide_V1.3_Nov86.pdf. 
  16. [1][|permanent dead link|dead link}}]
  17. "roelandjansen/pcmos386v501". 2 January 2022. https://github.com/roelandjansen/pcmos386v501. 
  18. "MPE/iX Command Reference Manual". http://www.teamnaconsulting.com/compresources/pdfs/c01687363.pdf. 
  19. "OS/2 Commands: Copy". http://www.jatomes.com/Help/Os2Cmd.php#COPY. 
  20. "copy". 3 February 2023. https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/copy. 
  21. "Datalight ROM-DOS User's Guide". https://www.datalight.com/assets/files/ROM-DOS_Users_Guide.pdf. 
  22. "reactos/reactos". 3 January 2022. https://github.com/reactos/reactos. 
  23. 86-DOS - Disk Operating System for the 8086 - User's Manual (Preliminary ed.). Seattle, Washington, USA: Seattle Computer Products, Inc.. 1980. http://www.patersontech.com/Dos/docs/86_Dos_usr_03.pdf. Retrieved 2019-07-14.  (59 pages)
  24. Running MS-DOS Version 6.22 (20th Anniversary Edition), 6th Revised edition. Microsoft Press. 2003. ISBN 0-7356-1812-7. 
  25. "OpenVOS Commands Reference Manual". http://stratadoc.stratus.com/vos/19.1.0/r098-19/wwhelp/wwhimpl/common/html/r098-19.pdf. 

Further reading

  • MS-DOS Commands: Microsoft Quick Reference, 4th Revised edition. Microsoft Press. 1990. ISBN 978-1556152894. 
  • Kathy Ivens; Brian Proffit (1993). OS/2 Inside & Out. Osborne McGraw-Hill. ISBN 978-0078818714. 
  • Frisch, Æleen (2001). Windows 2000 Commands Pocket Reference. O'Reilly. ISBN 978-0-596-00148-3. 

External links