Comments
Boogyman0202 t1_iu4s5k4 wrote
So I've always wondered, is that why when you get a new hard drive that's 1 gig the computer says it's really 998mb ?
breckenridgeback t1_iu4sclz wrote
No, that's because the hard drive itself reserves some storage for the programs that manage it (or, if it's a new prebuilt computer, some space is taken by the operating system).
Boogyman0202 t1_iu4sfcn wrote
Ah, makes sense.
Leucippus1 t1_iu4soz3 wrote
They stay where they are. Data is written in clusters onto the disk, inside those clusters circuits or little rods (depending on the technology) are positioned / charged to represent the files in binary. Those clusters are tagged for the OS to understand what clusters make up what files. When you delete a file, the clusters themselves remain but the tags are changed so you can overwrite the clusters with new data.
This is why if you accidentally delete something and realize it, you should boot to a live OS (so an OS running off a CD or flash drive, or whatever) that can examine the disk without exposing it to any write operations. If it happens quickly after deletion you can often re-construct the files.
Excellent_Set2946 t1_iu4tv45 wrote
They don’t go anywhere at first. They just get removed from the “table of contents” on the hard drive. In time they get overwritten by new files.
Excellent_Set2946 t1_iu4u02c wrote
That and there’s a difference between gigabits and gigabytes. Small but it makes a difference.
crash866 t1_iu4u0ga wrote
Some manufacturers use base10 for size while your computer measures it is binary.
A gigabyte (GB) -- pronounced with two hard Gs -- is a unit of data storage capacity that is roughly equivalent to 1 billion bytes. In decimal notation (base 10), a gigabyte is exactly 1 billion bytes. In binary notation (base 2), a gigabyte is equal to 230 bytes, or 1,073,741,824 bytes.
xRmg t1_iu4u7uk wrote
This has to do how hdd manufacturers count bytes. They count in terrabytes, where one TB is 10^12 bytes.
Operating systems count in Tebibytes, where one TiB is 2^40 bytes.
Excellent_Set2946 t1_iu4u8xn wrote
Dude. Explain like 5 not 15 lol
RevaniteAnime t1_iu4v67k wrote
that's um... gibibytes vs gigabytes.
gigabit = 1/8 of a gigabyte
Leucippus1 t1_iu4wtty wrote
There is a lot of abstraction to work through, but referring to rule 4 it isn't for actual 5 year olds.
I suppose, if I were to try, I would say that files are written like you might write information in wet concrete that never dries. The write operations is taxing, you have to sit there with a stick and etch in information. At the beginning and ending of each block of etchings, you have a series of symbols that someone can interpret as "these chunks of concrete data represent file x". Now, if I don't need that file anymore it is a nightmare to sit there with a stick and etch out all the data I wrote. It is as taxing as writing the file to begin with. Instead, I change the symbols so instead of saying "these chunks are relating to these files" it says "There is nothing here of interest, use them if you want." You basically make the responsibility of overwriting old data to the new file being written. The new file written doesn't care because that write operation has to write regardless of whether there as data there or not. It makes no real difference whether it is all zeros or all ones or some combo, the new file has to arrange it the way it has to arrange it.
dlbpeon t1_iu4yvo8 wrote
Your hard drive operating system has a file system. That file system uses a table of contents to point to the exact spot (spots) where your file resides. When you just delete a file, all it does is remove where it is indexed in the table of contents and marks the file itself as space that is able to be written over. Until new data is saved, that file is still there, just not indexed. When new data is saved, it writes over some or all the old data and a new index point is written in the table of contents.
throaway174881 t1_iu507py wrote
in your hard drive, data is just stored as a bunch of 1s, and 0’s. deleting it doesnt get rid of those 1s and 0s right away but it tells your computer it doesnt need those anymore and can change it if you want to download something else and it needs that space
hotfudgefries t1_iu51rk6 wrote
When the file is stored normally, you look up where it's at in a directory which is organized logically. So if you want the file "Abc123.txt" and you know it is stored at "C:\MyFiles", you browse to "C:\MyFiles" and pull it up.
Behind the scenes, there is additional information about where that file is physically stored on the disk. Maybe it's on disk 1, platter 2, track 15, sector 47. You don't really need to know all that information, but the system does. The system also knows that it can't use that particular location for new files. It's reserved.
When you move the file to trash, the directory is updated so that "Abc123.txt" now shows as being in "System\Trash". The file is still physically located in the same spot on disk 1, platter 2, track 15, sector 47, and it is still a reserved spot. It just doesn't show up in the regular directory.
When you remove it from trash, the file is still in the same physical location, but that spot is no longer reserved. When new files are added, the system can overwrite that physical location with new data, but if no new files are added, that physical location will still have the data. You just can't access it because you can't tell the computer directly to get the data from disk 1, platter 2, track 15, sector 47. Well, you can with specialized tools, but not from your regular operating system.
HaikuBotStalksMe t1_iu528lr wrote
Nope. You lose space because of the file structure. The hard drive has to have a way to make like a table of contents, so to speak, and that info takes up space.
ZLVe96 t1_iu52bmx wrote
As others have noted, they don't really go anywhere, but they are at risk of being damaged or destroyed. It works something like this-
You save a photo to your computer. Your computer saves the string of 1s and 0s in a specific location(s). So lets say it saves photo 1 to a space it calls A1 through A10 (simplified for ELI5). Two things happen- When you tell you computer you want to see the picture, it reads what is in space A1 to A10 on the drive. Also, it knows NOT to write anything else in those spaces, because if they do, it will corrupt the photo.
When you delete it, it removes it from the "table contents" , and now these 2 things happen- If you look for the file, you can't find it, because it's not in the table. Further, now any other program sees no restrictions to write to A1 to A10.
So there is a chance 1 year later you can still restore that file if the computer didn't write over any part of it, but there is also a chance that it will be corrupted because parts or all of the file have been overwritten.
explainlikeimfive-ModTeam t1_iu53qo7 wrote
Please read this entire message
Your submission has been removed for the following reason(s):
- ELI5 requires that you search the ELI5 subreddit for your topic before posting.
Please search before submitting.
This question has already been asked on ELI5 multiple times.
If you need help searching, please refer to the Wiki.
If you would like this removal reviewed, please read the detailed rules first. If you believe this was removed erroneously, please use this form and we will review your submission.
whurpurgis t1_iu4rern wrote
They’re actually still there but they get tagged so that they can be over written by new data. With the right program, like law enforcement has deleted files can be recovered if they were not over written.