-6

I was wondering that can we store unlimited data in a disk. So I just started researching that how can we do that. Well at first it seems quite inappropriate question but when I come to know about this then it make me to think that can i really put infinite data.


EXAMPLE

Here is an example suppose in Windows I just made one new .txt file and rather than storing data in the notepad what if I store my data on Name place means where file name are written.

Like -

Suppose i put some word abcdefghijklmnopqrstuvwxyz and i was able to put it 8 times means

26 * 8 - 1 = 207 words I can put (-1 as Z was not coming)

It means 1 thing is sure that i can put 207 words which is quite usefull. But if I try to see the properties I get size of file is 0 bytes it means I can put Infinite data with this type. enter image description here

So my question is, Is my Hypothesis is correct or not because as per normal people they can easily get fool by this explanation but I want to know the real reason behind this if it is wrong.

Note: This is ubuntu skin for windows xp so my operating system is windows xp professional.

1
  • This question is complete non-sense. Create a New Folder or New Text File on your desktop, hit propterties, the size reported will be 0 bytes. The fact your folder/file had a long name is meaningless. It does take up space Windows just Doesn't report it.
    – Ramhound
    Jun 20, 2014 at 15:24

2 Answers 2

7

No, storing data as filenames will not work. Disks store bits, and there is a finite number of bits per disk. Data must use some of those bits, so there can never ever be infinite capacity on the disk while these two facts remain true (and they aren't changing any time this decade).

Filenames are stored by your file system separately from your file data, so the file appears to be 0KB, but the filename itself is 207B long at least.

Names are stored in your filesystem's metadata tables (the specifics depend on your exact filesystem, but the $MFT is the NTFS table). These tables have a fixed size, so they can name only so many files per directory, and per disk. Additionally when a filename is very long, it usually uses more then one slot in the name table.

In the case you have described, you would be putting all your data in the name table, and would fill it up very quickly. you would be able to store far less data in the name table than you would in files on the disk, that used short names. You idea only looks like it works when dealing with a small number of files.

4
  • Well ... in that chase well you said correct thanx for the answer and 1 thing i really dont no but really this question deserve -1 :/ because what i just felt i just showed them to you.
    – Shashank
    Jun 20, 2014 at 14:08
  • I wasn't the one who down-voted your question, so i can't say why they choose to, but I think its because most people would assume that disks are incapable of doing what you suggest, storing infinite data. Jun 20, 2014 at 14:13
  • Note that there is some saving for small amounts of data, because even 1 byte of file data will take up a minimum of a disc allocation unit: depending on your disc size and format, this could be several KB. But the management of data stored as file names is outside any normal software, so you would need to write everything yourself, including text editing, database management, work processing, etc. The best (but slowest) compression in general use is in zip folders.
    – AFH
    Jun 20, 2014 at 14:25
  • actually many new filesystems allow sub-block allocation, so that we can store multiple files in a block as long as they are less than 512b cumulatively, but you are right, there is some small advantage in storing file data inside a larger container file, so as to not waste any space. the bigger issue though is most metadata tables are of limited size. en.wikipedia.org/wiki/Block_suballocation Jun 20, 2014 at 14:30
3

No, there is such a thing as the Shannon entropy, which establishes the limits to possible data compression. There is a certain amount of information in any message that you cannot reduce by any means when coding/compressing/storing the data. So you will always fill up any medium, i.e. you can never store unlimited data anywhere.

For more information:

Even if you extend your thinking to any physical space (i.e. not necessarily a hard disk) there is a maximum theoretical data density.

Not the answer you're looking for? Browse other questions tagged .