File size can be limited per user. If it’s limited to 1GB, you can’t create a file of size greater than 1GB. It will give you “File size limit exceeded” error.
To know what’s the present file size limit, use the command:
$ ulimit -a
It will show you:
file size (blocks, -f) 1048576
If it’s unlimited, you can see like:
file size (blocks, -f) unlimited
You should edit “/etc/security/limits.conf” if you want to change the limits.
Suppose, you want to set file size limit for the user mohammed to 1GB. Then, you can add the following entry to /etc/security/limits.conf (1GB=1048576KB)
mohammed hard fsize 1048576
You can verify changes using the command “dd if=/dev/zero of=test bs=1024M count=1”. This will create a file named “test” of size 1GB.