Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Increasing File Size

  1. Jan 19, 2010 #1
    Anyone know how to increase the size of a file, without actually increasing the space occupied on disk. I knew a guy who did this.
  2. jcsd
  3. Jan 19, 2010 #2


    User Avatar
    Gold Member


    If you started with a 100K file, you could compress it (say, using zip) to, say, 1/10th its uncompressed size. This means you could increase the original file to 1M, then compress it so that it still took up only 100K on disk.
  4. Jan 19, 2010 #3
    What it comes to be like this,
    say the file size is 200kb, he somehow made the file size attribute ,say 2MB without changing the space on disk, ie, it still costs just 200kb disk space, but for all other purposes it acts like a 2MB file.
    For example, wen uploading the file etc, it the properties will be displayed as 2MB.
  5. Jan 19, 2010 #4
    Um, are you sure it wasn't a 2000kb file (which is a 2MB file?)

    Google says the answer is to either create sparse files or do a compression trick.
  6. Jan 20, 2010 #5
    It happens in NTFS file system (not sure if this feature is available a Linux file system...need to check that out). It has a feature to compress the files in real time demoting it's already demoted performance in some systems.

    Cause of this the "size of file" and "size of file on disk" are different.

    But your friend did something opposite. I think this might be possible by tampering the default MFT.
  7. Jan 20, 2010 #6


    User Avatar

    Staff: Mentor

    No idea about NTFS, but on FAT each file is described by an entry in directory table - one of the fields there is the file size. Modify just these four bytes and file will be reported as larger (or smaller) then it is in reality. It can't be done on the OS level, but any disk editing software able to deal with the disk on the sector level will do.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook