The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > High Level Programming
.
google unix.com



High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
System Call Wrapper of 'open' yuno96 UNIX for Advanced & Expert Users 3 06-25-2009 01:35 PM
Content Management System for uploading large files z1dane Web Programming, Web 2.0 and Mashups 3 03-20-2009 12:52 AM
how to differentiate system call from library call muru UNIX for Advanced & Expert Users 2 07-20-2007 12:20 AM
Opening files saarshad001 UNIX for Dummies Questions & Answers 3 11-28-2003 12:42 PM
Opening Files AJA UNIX for Dummies Questions & Answers 4 11-10-2003 11:25 AM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 08-15-2009
dariyoosh's Avatar
dariyoosh dariyoosh is offline
Registered User
  
 

Join Date: Mar 2009
Location: Iran (Tehran)
Posts: 44
Question Is there a system call other than 'open' for opening very large files?

Dear all,


Inside a C program, I want to open a very big file (about 12 GB) in order to read its
content. Here is the code:


Code:
    /*
          argv[1] contains the path to the file.
    */
    inputFileDescriptor = open(argv[1], O_RDONLY);
    if (inputFileDescriptor < 0)
    {
        fprintf(stderr, "Error: Could not open the input file\n");
        fprintf(stderr, "%s\n", strerror(errno));
        return 1;
    }

And it seems that the file is too big, because I receive the following error message:

Code:
Error: Could not open the input file
Value too large for defined data type

Is there any other system call, allowing to open very big files?


Thanks in advance,
Dariyoosh
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 04:51 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0