In computers, why do some files, even if they are the same size, take longer to be moved or deleted than others?

503 views

I noticed this when I deleted a 2 GB video file on my laptop today, which took less than 5 seconds. But when I deleted a separate folder that was smaller than 2 GB, it took way longer to get deleted.

In: Technology

8 Answers

Anonymous 0 Comments

This has to do with the way computer usually handle such things as deleting or moving files.

Normally when you delete a file, the computer does not actually delete the data itself. Instead it goes to a sort of index where it has a tabel that says where each part of a file is located on the storage device.

You can think of it as going to the table of contents in a book and striking out the entry for a chapter and what page it is one. If you flip though the book you will still find the chapter, but if you only look at the table of contents it is gone.

From that metaphor you can also see why striking out a single chapter that goes fro a hundred pages is faster than striking out 100 chapters that are only a page long each.

Something similar happens if you rename or move a file around in the same drive. The file itself stays put you only mess with the entry in the table that says where what is.

You can move a file that is hundred of gigabytes from one folder to another in almost no time, but moving a hundred tiny files takes a bit of more time.

You are viewing 1 out of 8 answers, click here to view all answers.