Everyone knows /dev/null, and most will know /dev/zero. But /dev/full was unknown to me until some time ago. This device will respond to any write request with ENOSPC, No space left on device. Handy if you want to test if your program catches "disk full" - just let it write there:
$ echo foo > /dev/full bash: echo: write error: No space left on device
via df7cb.de
pretty handy
Bojan Babic
hehe, handy indeed.
ReplyDeleteIn case your OS doesn't have /dev/full (e.g. Solaris; /dev/full is Linux feature), you can make it (as root):
mknod -m 666 /dev/full c 1 7
chown root:root /dev/full
Now, post is more complete
ReplyDeleteThanks for insight :)