From owner-freebsd-hackers@FreeBSD.ORG Sat Jun 19 18:47:39 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5CF5416A4CE for ; Sat, 19 Jun 2004 18:47:39 +0000 (GMT) Received: from kientzle.com (h-66-166-149-50.snvacaid.covad.net [66.166.149.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id DF96043D49 for ; Sat, 19 Jun 2004 18:47:38 +0000 (GMT) (envelope-from kientzle@freebsd.org) Received: from freebsd.org (p54.kientzle.com [66.166.149.54]) by kientzle.com (8.12.9/8.12.9) with ESMTP id i5JIlL90043357; Sat, 19 Jun 2004 11:47:22 -0700 (PDT) (envelope-from kientzle@freebsd.org) Message-ID: <40D48A39.30401@freebsd.org> Date: Sat, 19 Jun 2004 11:47:21 -0700 From: Tim Kientzle User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.4) Gecko/20031006 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Scott Mitchell References: <20040619175007.GB462@tuatara.fishballoon.org> In-Reply-To: <20040619175007.GB462@tuatara.fishballoon.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-hackers@freebsd.org Subject: Re: /bin/ls sorting bug? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Jun 2004 18:47:39 -0000 Scott Mitchell wrote: > > ls(1) says that the -t option will: > > Sort by time modified (most recently modified first) before sort- > ing the operands by lexicographical order. > > ... the attached patch produces the expected output. I can commit it if there > are no objections. Looks good to me. I wonder if the time sorting should include the nanos field as well. (Mostly on FreeBSD, the nanos field is zero, but not always.) Of course, sorting on the (non-displayed) nanos field could also produce such unexpected output as you describe. Tim