[go: nahoru, domu]

File copying: Difference between revisions

Content deleted Content added
 
(8 intermediate revisions by 5 users not shown)
Line 1:
{{short description|Operation which creates a new digital file with contents identical to another}}
{{multiple issues|
{{more citations needed|date=December 2009}}
{{Essay-likeuse dmy dates|date=JanuaryDecember 20172021|cs1-dates=y}}
{{use list-defined references|date=January 2022}}
}}
 
In digital [[computerfile file|filemanagement]] management, '''file copying''' is thea creation[[Computer_file#Operations|file ofoperation]] that creates a new [[Computer file|file]] which has the same content as an existing file. Computer [[operating system]]s include file copying methods to users, with; operating systems with [[graphical user interface]]s ([[GUI]]s) often providing [[copy-and-paste]] or [[drag-and-drop]] methods of file copying. Operating systems may have specialized file -copying APIs[[API]]s are usually able to tell the server to perform the copying locally, without sending file contents over the network, thus greatly improving performance.
 
== Description ==
Line 14 ⟶ 13:
 
== Use ==
All computer [[operating system]]s include file copying provisions in the user interface, like the command, "[[cp (Unix)|cp]]" in [[Unix]] and "[[copyCOPY (command)|copyCOPY]]" in [[MS-DOS]]; operating systems with a [[graphical user interface]], or [[GUI]], usually provide [[copy-and-paste]] or [[drag-and-drop]] methods of file copying.  [[File manager]] applications, too, provide an easy way of copying files.
 
== {{anchor|NCOPY}}Implementation ==
Internally, however, while some systems have specialized [[application programming interface]]s ([[API]]s) for copying files (like CopyFile and CopyFileEx in [[Windows API]]), others (like Unix and DOS) fall back to simply reading the contents of the old file and writing it to the new file.
 
This makes little difference with local files (those on the computer's hard drive), but provides an interesting situation when both the source and target files are located on a remote [[file server]].&nbsp;Operating systems with specialized file copying APIs are usually able to tell the server to perform the copying locally, without sending file contents over the network, thus greatly improving performance.&nbsp;Those systems that have no comparable APIs, however, have to read the file contents over the network, and then send them back again, over the network. Sometimes, remote file copying is performed with a specialized command, like "NCOPY" in DOS clients for [[Novell NetWare]]. The [[COPY (DOS command)|COPY]] command in some versions of [[DR-DOS]] since 1992,<!--ref actually implemented for DR DOS Panther on 1992-06-22, see DOSSRC.ZIP: COMCPY.Cname="Caldera_1997_DOSSRC"/DOSIF.ASM. This feature cannot be found in MS-DOS/PC DOS (requires external tools like NCOPY there). --> 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.&nbsp;
 
== See also ==
Line 33 ⟶ 32:
 
== References ==
{{Reflist|refs=
{{No footnotes|date=January 2018}}{{Reflist}}
<ref name="Caldera_1997_DOSSRC">{{cite web |title=Caldera OpenDOS Machine Readable Source Kit (M.R.S) 7.01 |publisher=[[Caldera (company)|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]].)</ref>
}}
 
== 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
Line 40 ⟶ 43:
== 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}}