/dev/full

If you have ever written or read some shell scripts you might have come across the /dev/null device to discard output.

Today i learned about another special file i’ve never seen used before: /dev/full. It pretty much does what it says. It is a device with no space left! You can use it to easily test how (your) scripts handle writing to a full device.

$echo "I hope this will be written somewhere" > /dev/full
echo: write error: no space left on device

Neat!