0

I am trying to write a large file, but it always stops writing when it hits 2GB. (2147483647 bytes to be exact). I know it's not an O/S or disk issue (I'm on solaris) as I'm able to use the mkfile command to create a 3GB file.

I'm using the SUN workshop compiler. Are you aware of any flags that I can use that will allow writing files that are larger than 2GB?

1
Contributor
1
Reply
2
Views
11 Years
Discussion Span
Last Post by winbatch
0

I was able to figure it out by doing 'man lfcompile', which told me about 'getconf'. I then ran getconf LFS_CFLAGS and got
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64

Once I compiled with these flags, I could create files larger than 2 GB.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.