#MATL, 10 bytes
`1[]T3$Z#T
###Explanation
This is an infinite loop that writes number 1 to a file called inout in current directory, overwriting previous file's contents.
` % do...while loop
1 % push number 1
[] % push empty array
T % push "true"
3$Z# % fwrite function. First input is file content. Second is file name;
% defaults to "inout" if empty. Third indicates that any previous
% file contents should be discarded
T % push "true".: loop condition
% implicitly end loop. Loop condition is "true", so the loop is infinite