Limit Open File Size

What is the best way to limit the size of an open file? I have a file that I only want to get so large before I start from the beginning.

you can check the file size when you open it: