file copying#NCOPY
{{short description|Act of creating a new computer file with content matching an exiting file}}
{{more citations needed|date=December 2009}}
{{use dmy dates|date=December 2021|cs1-dates=y}}
{{use list-defined references|date=January 2022}}
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. Typically, an operating system provides for users to copy files. A graphical user interface (GUI), such as a file manager, may provide for copy-and-paste and drag-and-drop user experience.
Unix-based and Windows shells provide command-line interface (CLI) commands such as cp and COPY.
Shadow copy
Remote copy
{{anchor|NCOPY}}
Some systems have specialized system calls for copying files (like {{code|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 {{code|NCOPY}} in DOS clients for Novell NetWare. The COPY command in some versions of DR-DOS since 1992, 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
- {{section link|Computer file#Moving methods}}
- Backup software
- Disc cloning
- File synchronization
- Hard copy
- List of file copying software
- ln (Unix)
- Optical disc authoring
- NTFS junction point
- Zero copy
References
{{Reflist|refs=
{{cite web |title=Caldera OpenDOS Machine Readable Source Kit (M.R.S) 7.01 |publisher=Caldera, Inc. |date=1997-05-01 |url=https://archive.sundby.com/retro/DR-DOS/dossrc.zip |access-date=2022-01-02 |url-status=live |archive-url=https://web.archive.org/web/20210807095409/https://archive.sundby.com/retro/DR-DOS/dossrc.zip |archive-date=2021-08-07}} [https://web.archive.org/web/20220102102656/https://archive.sundby.com/retro/OpenDOS/OPENDOS_7.01_CODE.ZIP] (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
- [http://www.freepatentsonline.com/5043876.html N-level file shadowing and recovery in a shared file system], United States Patent 5043876
- [http://www.freepatentsonline.com/5276871.html Method of file shadowing among peer systems], United States Patent 5276871
- [https://web.archive.org/web/20061127130733/http://www.ibexpert.info/documentation/%20%209.%20IBExpert%20Services%20Menu/%20%202.%20Restore%20Database/%20%201.%20Database%20Shadow%20Files/15713.html Database Shadow Files]
External links
- [https://www.gnu.org/software/emacs/manual/html_node/emacs/File-Shadowing.html Instructions on how to shadow files] for Emacs
{{Computer files}}
{{DEFAULTSORT:File Copying}}