![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| fetchmail - log file size limitation | DILEEP410 | Shell Programming and Scripting | 10 | 05-20-2008 07:41 AM |
| Size limitation in Tar command | Manvar Khan | Shell Programming and Scripting | 4 | 07-20-2007 09:19 AM |
| File size limitation for rcp | schoubal | Linux | 2 | 01-14-2006 01:58 AM |
| HP-UX 11i - File Size Limitation And Number Of Folders Limitation | sundeep_mohanty | HP-UX | 2 | 08-01-2005 07:58 PM |
| unix group file limitation | asmillie | SUN Solaris | 3 | 06-28-2005 10:13 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
File size limitation of unix sort command.
hi ,
iam trying to sort millions of records which is delimited and i cant able to use sort command more than 60 million..if i try to do so i got an message stating that "File size limit exceeded",Is there any file size limit for using sort command.. How can i solve this problem. thanks cskumar |
|
||||
|
Hi Pixelbeat,
Thanks for your quick response. We are trying this on HP UX 11. We are generating input file for sorting through c program and calling unix sort command through c only, as follows:: #include <stdio.h> #include <string.h> #include <stdlib.h> FILE *fout; int main(int argc,char *argv[]) { int loopcnt=0; unsigned long int TTRECS = 60000000; if((fout = fopen("SORTINPUT","w")) == NULL) { printf("\nUnable to open the output_file file\n"); exit(1); } for (loopcnt=TTRECS;loopcnt>=1;loopcnt--) { fprintf(fout,"%d|%s%d|%s|\n",loopcnt,"Dummy",loopcnt,"Dummy Description"); } fflush(fout); printf("Executing::sort -t '|' -k 1,1 SORTINPUT> sorttestoutput\n"); system("echo Sort Start Time;date"); system("sort -t '|' -k 1,1 SORTINPUT > sorttestoutput"); system("echo status returned::$?"); system("echo Sort End Time;date"); printf("Total Records Configured:: %lu\n", TTRECS); return 0; } We are trying this test just to make sure that unix sort command is not having any limitations on file size. But what we observed is when file is packed with more than 60 million records [ around 2 Gb size], we are getting an error stating "File size limit exceeded" on console. Can u kindly state, 1] whether we got any maximum file size limit in HP UX while creating a file through C program. 2] Can unix sort command can handle file size > 2 GB without any failure. 3] Is there any restriction for length of each record [each line] or each field[fields are separated by a delimeter]. Thanks, |
|
||||
|
Quote:
If I were you I'd try to edit your C code to see if the error occurs before the sort command is called or not. I'd say it's before it, because I think the error might begin by "sort: " if the error was caused by sort. |
|
||||
|
thanks for ur reply chlorine,
Yes as u said error is before sort only as we couldn't create a file of size more than 2 GB through c. [1] Can u suggest a way to get rid of that size problem. [2] Can u let us know whether we got any such file size limitation for sort command. |
![]() |
| Bookmarks |
| Tags |
| linux |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|