I would like to create a "/dev/null
" directory (or a "blackhole" directory) such that any files written to it are not really written, but just disappear.
I have an application that writes out large temporary files to a directory. I have no control over the name of the files and I don't really care about the content of these files. I could write a script that periodically clobbers these files, but the files are written out very quickly and fill my disk. I'm looking for something cleverer. I want the application to "think" that it is writing out these files, when in fact, the writes are just being discarded at the other end.
Also see this old related thread.
tmpfs
works well for my current purposes - with predictable medium-sized discardable files.