I've got a program that generates a crazy amount of data and I'm really only interested in seeing the stdout it generates. Rather than running the program, filling up my disk, then deleting the unwanted files every time, is there a way I could just redirect all that file I/O to /dev/null in the same way I can redirect stdout to /dev/null?
Asked
Active
Viewed 124 times
0
-
You mean you want to redirect standard error? What is this "file I/O" you mention? – terdon Nov 05 '21 at 17:19
-
1It sounds like you're getting unwanted files created. If this is the case and the file names are known beforehand, can you use symbolic links to point the files to `/dev/null`? You'll still have a lot of filenames but the data use is minimal. – doneal24 Nov 05 '21 at 17:31
-
also, what (in GB) is "a crazy amount of data"? How much RAM do you have, in comparison? – Marcus Müller Nov 05 '21 at 22:01
-
1This question is already asked and answered at https://unix.stackexchange.com/questions/9332/how-can-i-create-a-dev-null-like-blackhole-directory – Garo Nov 06 '21 at 14:10
-
The application is a non-traditional compiler that I work on. In practice about 10-20TB of data. nullfs might be an option, I'll play with it. I'm wondering if Docker can be useful? – dromodel Nov 06 '21 at 21:27
-
Does this answer your question? [How can I create a /dev/null-like "blackhole" directory?](https://unix.stackexchange.com/questions/9332/how-can-i-create-a-dev-null-like-blackhole-directory) – AdminBee Nov 08 '21 at 08:07