Reputation: 7269
Just a general question, what is the difference between moving a file and the cut/copy/paste operation(s)? I mean at least as far as the underlying operating system goes. What happens to the attributes of the file in each operation? I'm just curious.
Upvotes: 5
Views: 12255
Reputation: 813
One specific case can be explained Why cut-paste of files is most times faster than copy-paste of files ?
Files are stored in Folders (also called directories) For practical purposes Folders can be assumed to be a "list" of files-names
When a file is copy-pasted, the entire file is copied to the new location, hence the time taken to do this is generally proportional to the size of the file. Bigger the file, more time it takes.
When a file is cut-pasted, the file is generally not touched. The folder in which the file originally resides, the entry is removed from its list and added to the list in the new Folder. Hence irrespective of how big or small the file is, we just have to remove one entry from source folder and add one entry in destination folder.
The cut-paste logic works only in the same partition. Folder list cannot span across partitions If we try cut-paste of file from one partition to another, it takes as much time as copy-paste
Upvotes: 1
Reputation: 2768
copy: data from sectors is copied to other sectors on disk
cut: data is at the same sectors, index is updated on disk
correct me if I'm wrong.
For myself I can tell, the speed diference when copying files or cuting files is huge, especially when you copy/cut large files
Upvotes: 0
Reputation: 363627
If you mean cut and paste of an entire file in your file manager, that's (in any sensible file manager) just a move operation, i.e. a rename
operation or, if that fails, a copy followed by an unlink
.
The attributions are preserved, if possible. (E.g., moving a file from a Unix volume to a mounted Windows FAT volume may not preserve all attributes, as FAT doesn't support ownership and permissions. If they're not preserved while moving inside a single volume, that's a bug.)
Upvotes: 3
Reputation: 4094
What you're talking about is a difference in user interface metaphor. Under the hood, both operations would be implemented using the same mechanisms.
Upvotes: 1