Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Blog | Linux Links | Bling | About BLU

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

file size limitation in linux?



Greg Gimler wrote:
> I am trying to record a file > 2gb in size.  I'm using the system call 
> open() with the mode switch O_LARGEFILE.  I get  a compiler warning that 
> the macro doesn't exist.  I am including sys/fcntl.h.  I'm running 
> redhat 7.1 with kernel
> 2.4.2-2.  Does anyone know of a way around this 2gb limit?  Thanks.

First, you have to use a file system that supports larger files. ext2 and ext3 have a file size limit of 2GB, so even if you got your code to compile, it wouldn't help. On that version of Red Hat, about the only option you have for bigger files is FAT32, which will handle files up to 4GB. On a newer system, you could use ReiserFS or JFS; I wouldn't recommend trying either of those on a system running a 2.4.2 kernel.

I had a look at fcntl.h on my system (SuSE 8.0, gcc 2.95.2), and it doesn't have O_LARGEFILE either. What it does have is an open64 function that you can use to open large files. There are also some symbols that can be defined to make open64 replace open.

I don't have any personal experience with using this stuff.





BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org