Subject: Re: sort(1) opens too many files
To: Geoff Wing <mason@primenet.com.au>
From: Dave Huang <khym@azeotrope.org>
List: current-users
Date: 04/05/2001 05:22:05
On 5 Apr 2001, Geoff Wing wrote:
> I saw this (with glimpse also) and did a quick investigation.  Seemed
> that the BSD sort uses lots of temporary files via mkstemp() then
> unlink()ing immediately so they're not visible to ls, etc.  lsof/fstat
> shows them.  They'll normally be in /tmp unless you override with -T

Yeah, but is it _supposed_ to use that many temporary files? If it is,
then well, it sure does suck :) Especially since it's incapable of
sorting files larger than 704MB (according to the man page). Seems to me
that if it's going to be using the disk to store stuff, the largest file
it can sort should be constrained by available disk space. Anyways, I
never had to up my file descriptor limit with GNU sort...