5

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.

1
  • 1
    I think moving a file is same as cut and paste operations... Jan 15, 2011 at 6:46

4 Answers 4

3

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.)

1

What you're talking about is a difference in user interface metaphor. Under the hood, both operations would be implemented using the same mechanisms.

1

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

0

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

1
  • Yes, that's part of the reason I ask this question. I notice certain minor speed differences when I'm copying and pasting a file using my mouse and the menu context vs using the keyboard shortcut. I've also seeing how much faster it can be when using the command line. Jan 21, 2011 at 17:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.