Creating an arbitrarily large "fake" file

view full story

http://unix.stackexchange.com – I would like to create a special file similar to /dev/null or /dev/random, where the file doesn't actually exist but you can read from it all the same, except that I could actually set a cap on the apparent size of the file. To put it another way, I want to create a special file where (assuming I set the cap at 500gb) when I "cat" the file it will output all 500gb of the file and then stop. It needs to act the same as an actual 500gb file, but without taking the space. The contents of this file don't matter, it could be all \0's like /dev/null, or just a small string being sent over and over (HowTos)