o.m.g. It works. 

Why doesn't sort uses this by default on files larger then 60 MByte? 

Thanks!

-------- Original Message --------
From: Andreas Zeilmeier <[email protected]>
Apparently from: [email protected]
To: [email protected]
Subject: Re: I found a sort bug! - How to sort big files?
Date: Sat, 14 Mar 2015 13:16:05 +0100

> On 03/14/15 12:49, sort problem wrote:
> > Hello, 
> > 
> > ----------
> > # uname -a
> > OpenBSD notebook.lan 5.6 GENERIC.MP#333 amd64
> > # 
> > # du -sh small/                                                             
> >                                                                             
> >                                                        
> > 663M    small/
> > # ls -lah small/*.txt | wc -l                                               
> >                                                                             
> >                                                        
> >       43
> > # 
> > # cd small
> > # ulimit -n
> > 10000000
> > # sysctl | grep -i maxfiles
> > kern.maxfiles=1000000000
> > # 
> > # grep open /etc/login.conf                                                 
> >                                                                             
> >                                                        
> >         :openfiles-cur=100000:\
> >         :openfiles-cur=1280000:\
> >         :openfiles-cur=512:\
> > # 
> > # sort -u *.txt -o out
> > Segmentation fault (core dumped)
> > # 
> > ----------
> > 
> > This is after a minute run.. The txt files have UTF-8 chars too. A line is 
> > maximum a few ten chars long in the txt files. All the txt files have UNIX 
> > eol's. There is enough storage, enough RAM, enough CPU. I'm even trying 
> > this with root user. The txt files are about ~60 000 000 lines.. not a big 
> > number... a reboot didn't help. 
> > 
> > 
> > 
> > Any ideas how can I use the "sort" command to actually sort? Please help!
> > 
> > 
> > 
> > Thanks, 
> > 
> > btw, this happens on other UNIX OS too, lol... why do we have the sort 
> > command if it doesn't work?
> > 
> 
> Hi,
> 
> have you tried the option '-H'?
> The manpage suggested this for files > 60MB.
> 
> 
> Regards,
> 
> Andi

Reply via email to