6th March 2015

Testing file-size limits

For testing purposes you may want to provoke a file-size error. Here are the steps. Open a new bash/xterm. Set a file-size limit with ulimit, then write a file with dd.

ulimit -f 1
dd bs=1 iflag=count_bytes count=5000 if=/dev/zero of=yourFile

The resulting error is

File size limit exceeded (core dumped)

just as expected.

Categories: Linux
Tags: ,
Author: Elmar Klausmeier