/dev/full

TL;DR

I discovered /dev/full.

Thanks to this post from Su-Shee, I discovered /dev/full:

Writes to the /dev/full device will fail with an ENOSPC error. This can be used to test how a program handles disk-full errors.

Reads from the /dev/full device will return characters.

Seeks on /dev/full will always succeed.

Additionally, according to the Wikipedia page:

[/dev/full] provides an infinite number of zero bytes to any process that reads from it (similar to /dev/zero).

So there you have it, another thing that might come handy one day for testing stuff.

Thanks Su-Shee!


Comments? Octodon, , GitHub, Reddit, or drop me a line!