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.

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s