File copying
This article needs additional citations for verification. (December 2009) |
In computing, file copying is the act of creating a new file such that it has the same content as an existing file. The operation is sometimes called cloning.
Generally, an operating system command-line shell provides for file copying via commands cp
, copy
and similar variants. mv
also copies files but only when the source and destination are on different file systems. Windows also provides includes the more advanced tools: Robocopy and xcopy.
Many operating systems also provide for copying files via a graphical user interface, such as a file manager. It may provide for copy-and-paste and drag-and-drop user experience.
Notable third-party utilities:
Shadow copy
[edit]Shadowing describes the process of maintaining a copy of a set of files, a.k.a. to mirror files in a separate physical location. Depending on the reasons behind the shadow operation, this location may be as close as the BIOS chip to the RAM modules or as far away as the other side of the globe.
Remote copy
[edit]
Some systems have specialized system calls for copying files (like CopyFile
in Windows API), while others (like Unix-based and DOS) simply read the contents of the existing file into memory and write it to a new file. A specialized system call provides little advantage for files on local storage, but can optimize operation when the source and target files are on a remote file server. The system call can tell the server to process the files on the server's file system; without sending file content over the network; thus greatly improving performance. Lacking such file server support, copying requires reading file content over the network, and sending it back over the network again.
Sometimes, remote file copying is performed with a specialized command, like NCOPY
in DOS clients for Novell NetWare. The COPY command in some versions of DR-DOS since 1992,[1] has built-in support for this.
An even more complicated situation arises when one needs to copy files between two remote servers. The simple way is to read data from one server, and then to write the data to the second server.
See also
[edit]- Computer file § Moving methods
- Backup software
- Disk cloning
- Disk mirroring
- File synchronization
- Hard copy
- ln (Unix)
- NTFS junction point
- Optical disc authoring
- Peripheral Interchange Program
- Zero copy
References
[edit]- ^ "Caldera OpenDOS Machine Readable Source Kit (M.R.S) 7.01". Caldera, Inc. 1997-05-01. Archived from the original on 2021-08-07. Retrieved 2022-01-02. [1] (NB. Actually implemented since DR DOS "Panther" on 1992-06-22, see COMCPY.C/DOSIF.ASM in the COMMAND.COM sources of OpenDOS 7.01.)
Further reading
[edit]- N-level file shadowing and recovery in a shared file system, United States Patent 5043876
- Method of file shadowing among peer systems, United States Patent 5276871
- Database Shadow Files