This articleneeds additional citations forverification. Please helpimprove this article byadding citations to reliable sources. Unsourced material may be challenged and removed. Find sources: "File copying" – news ·newspapers ·books ·scholar ·JSTOR(December 2009) (Learn how and when to remove this message) |
Incomputing,file copying is the act of creating a newfile such that it has the same content as an existing file. The operation is sometimes calledcloning.
Generally, anoperating systemcommand-lineshell provides for file copying via commandscp
,copy
and similar variants.mv
also copies files but only when the source and destination are on differentfile systems.Windows also provides includes the more advanced tools:Robocopy andxcopy.
Many operating systems also provide for copying files via agraphical user interface, such as afile manager. It may provide forcopy-and-paste anddrag-and-dropuser experience.
Notable third-party utilities:
Shadowing describes the process of maintaining a copy of a set of files, a.k.a. tomirror files in a separate physical location. Depending on the reasons behind the shadow operation, this location may be as close as theBIOS chip to theRAM modules or as far away as the other side of theglobe.
Some systems have specializedsystem calls for copying files (likeCopyFile
inWindows 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 localstorage, but can optimize operation when the source and target files are on a remotefile 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, likeNCOPY
in DOS clients forNovell NetWare. TheCOPY command in some versions ofDR-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.