From owner-cvs-all@FreeBSD.ORG Sat Jun 4 11:16:49 2005 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 07E4316A41C; Sat, 4 Jun 2005 11:16:49 +0000 (GMT) (envelope-from bde@zeta.org.au) Received: from mailout2.pacific.net.au (mailout2.pacific.net.au [61.8.0.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7C28B43D48; Sat, 4 Jun 2005 11:16:48 +0000 (GMT) (envelope-from bde@zeta.org.au) Received: from mailproxy1.pacific.net.au (mailproxy1.pacific.net.au [61.8.0.86]) by mailout2.pacific.net.au (8.12.3/8.12.3/Debian-7.1) with ESMTP id j54BGkkG017265; Sat, 4 Jun 2005 21:16:46 +1000 Received: from epsplex.bde.org (katana.zip.com.au [61.8.7.246]) by mailproxy1.pacific.net.au (8.12.3/8.12.3/Debian-7.1) with ESMTP id j54BGiAT026393; Sat, 4 Jun 2005 21:16:44 +1000 Date: Sat, 4 Jun 2005 21:16:45 +1000 (EST) From: Bruce Evans X-X-Sender: bde@epsplex.bde.org To: Mathieu Arnold In-Reply-To: <44DA2BAD00E3D78FB3E03F96@cc-171.int.t-online.fr> Message-ID: <20050604205558.I5262@epsplex.bde.org> References: <200506031105.j53B5xBv040850@repoman.freebsd.org> <20050603151728.GA77595@cat.robbins.dropbear.id.au> <44DA2BAD00E3D78FB3E03F96@cc-171.int.t-online.fr> MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="0-222696682-1117883805=:5262" Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org, Tim Robbins , Dima Dorfman Subject: Re: cvs commit: src/bin/ls cmp.c extern.h ls.1 ls.c util.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Jun 2005 11:16:49 -0000 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --0-222696682-1117883805=:5262 Content-Type: TEXT/PLAIN; charset=X-UNKNOWN; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE On Sat, 4 Jun 2005, Mathieu Arnold wrote: > +-le 04/06/2005 01:17 +1000, Tim Robbins =E9crivait : > | On Fri, Jun 03, 2005 at 11:05:59AM +0000, Dima Dorfman wrote: > |> dd 2005-06-03 11:05:58 UTC > |> > |> FreeBSD src repository > |> > |> Modified files: > |> bin/ls cmp.c extern.h ls.1 ls.c util.c > |> Log: > |> Add the -S option to sort files by size. NetBSD and OpenBSD already > |> have this option with identical semantics (sorting large files first= ). > |> -r can be used to reverse the sort if that is desired. > | > | How is this different from |sort -k5,5nr? > > Works only if you use "-l". Use -l then: ls -l | sort -k5,5nr | awk '!/^total/ {print $9}' This shows another bug: the "totals" line gets in the way for filters simpler than the above and is documented to not be printed (for ls -l) unless the output is to a terminal but it is actually printed independently of the output device. ls -s is documented to print totals like ls -l but works as documented for non-terminals despite the code that prints it being identical. ls -CS # no easy way to do this with a filter but who care= s Bruce --0-222696682-1117883805=:5262--