Copy (command) explained

copy
Developer:DEC, Intel, MetaComCo, Heath Company, Zilog, Microware, HP, Microsoft, IBM, DR, TSL, Datalight, Novell, Toshiba
Operating System:RT-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
Genre:Command
License:HDOS: 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 (Unix)|cp]], the CP/M command is [[Peripheral Interchange Program|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 (DOS command)|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 (Unix)|cat]] command). It can also copy files between different disk drives.

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

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

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

See also

Further reading

External links

Notes and References

  1. Web site: Microsoft TechNet Copy article. 11 September 2009 .
  2. Book: AmigaDOS quick reference. Hannes. Rügheimer. Christian. Spanik. 14 September 1988. Grand Rapids, Mi : Abacus. 9781557550491. Internet Archive.
  3. Web site: RT-11 HELP FILE. paleoferrosaurus.com. 2019-07-06 . 2018-07-17 . https://web.archive.org/web/20180717041552/http://paleoferrosaurus.com/beta/documents/rt11help.html#COPY. dead.
  4. "Concise Command Language" (CCL).Web site: OS/8 Handbook . April 1974 . 28 November 2017.
  5. Book: RSX A Guide for Users . 1987 . John F. Pieper . Digital Equipment Corporation . 0-932376-90-8 . 2020-09-19.
  6. http://bitsavers.org/pdf/intel/ISIS_II/9800306-06_ISIS-II_Users_Guide_May81.pdf ISIS II Users Guide
  7. Web site: intel :: iRMX :: 146194-001 irmxR6Intro. Internet Archive.
  8. Book: TOPS-10 Operating System Commands Manual . August 1980 . Digital Equipment Corporation . 2019-02-17 . 2020-08-09 . https://web.archive.org/web/20200809145058/http://scandocs.trailing-edge.com/tops10-aa-0916d-tb.pdf . dead .
  9. Web site: TOPS-20 Command manual. 2018-07-18 . 2020-08-09 . https://web.archive.org/web/20200809103116/http://www.textfiles.com/bitsavers/pdf/dec/pdp10/TOPS20/V6.1/AA-FP65A-TM_tops20CmdsRef.pdf. dead.
  10. Web site: OpenVMS User's Manual. www.itec.suny.edu.
  11. Web site: Operating manual . www.pagetable.com . 2020-09-14.
  12. Web site: Software Reference Manual HDOS SYSTEM Chapter 2 General Operations . en . Heath Company . Heath Company . 2020-02-08 . 2017-08-07 . https://web.archive.org/web/20170807205702/http://sebhc.lesbird.com/documentation/software/HDOS-2/HDOS_Reference_Chapter2.pdf . dead .
  13. https://www.z80cpu.eu/mirrors/oldcomputers.dyndns.org/public/pub/rechner/zilog/zds/z80-rio_os_userman.pdf Z80-RIO OPERATING SYSTEM USER'S MANUAL
  14. Book: Paul S. Dayan. 1992. The OS-9 Guru - 1 : The Facts. Galactic Industrial Limited. 0-9519228-0-7.
  15. Web site: FlexOS User's Guide . 1986 . www.bitsavers.org . 2020-09-14 . 2010-08-08 . https://web.archive.org/web/20100808010315/http://www.bitsavers.org/pdf/digitalResearch/flexos/1073-2003_FlexOS_Users_Guide_V1.3_Nov86.pdf . dead .
  16. https://archive.org/details/4690OSV6r2UsersGuide/page/n169
  17. Web site: roelandjansen/pcmos386v501. GitHub. 2 January 2022.
  18. Web site: MPE/iX Command Reference Manual . 2018-10-21 . 2018-10-21 . https://web.archive.org/web/20181021232213/http://www.teamnaconsulting.com/compresources/pdfs/c01687363.pdf . dead .
  19. Web site: OS/2 Commands: Copy . 20 July 2019 . https://web.archive.org/web/20190414130029/http://www.jatomes.com/Help/Os2Cmd.php#COPY . 14 April 2019 . dead .
  20. Web site: copy. docs.microsoft.com. 3 February 2023 .
  21. Web site: Datalight ROM-DOS User's Guide. www.datalight.com.
  22. Web site: reactos/reactos. GitHub. 3 January 2022.
  23. Book: 86-DOS - Disk Operating System for the 8086 - User's Manual . Preliminary . Version 0.3 . 1980 . . Seattle, Washington, USA . 2019-07-14 . dead . https://web.archive.org/web/20190714004434/http://www.patersontech.com/dos/docs/86_Dos_usr_03.pdf . 2019-07-14. (59 pages)
  24. Book: Wolverton. Van. Running MS-DOS Version 6.22 (20th Anniversary Edition), 6th Revised edition. 2003. Microsoft Press. 0-7356-1812-7.
  25. Web site: OpenVOS Commands Reference Manual . stratadoc.stratus.com. 2020-09-14.