On Wed, 20 Apr 2016 20:14:33 -0000 (UTC), Jim Whitby
<
mr.s...@spockmail.net> wrote:
>Seems to be some smart people here. I need to learn how to empty the /dev/
>null device.
>
>I have lots of scripts that that write to it and I suspect it needs
>emptied.
>
>Any help?
Sure. Merely change /dev/null from a device node to an ordinary file
with 666 permissions. The file will grow and grow until your disk
fills up. Overflow indicates that it's time to clean out the
accumulated junk with a simple:
> /dev/null
and start over. No need to have root permission, anyone can do it.
With this method, you have the satisfaction of knowing that /dev/null
is working, not having a dangerous black hole in the middle of your
system, and giving the NSA a chance to look at what you are trying to
hide in /dev/null. If you get tired of clearing the /dev/null file,
you can build a FIFO buffer (i.e. named pipe) where /dev/null is
maintained at a fixed size, and new junk tossed into /dev/null will
push old junk out the other end of the pipe. I'm not a very good
programmist, but I'm sure it can be done by someone more evil and
devious than me.