From owner-freebsd-arch Wed Mar 6 12:18:47 2002 Delivered-To: freebsd-arch@freebsd.org Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by hub.freebsd.org (Postfix) with ESMTP id 8650137B400 for ; Wed, 6 Mar 2002 12:18:42 -0800 (PST) Received: by elvis.mu.org (Postfix, from userid 1192) id 6389FAE1D0; Wed, 6 Mar 2002 12:18:42 -0800 (PST) Date: Wed, 6 Mar 2002 12:18:42 -0800 From: Alfred Perlstein To: Wes Peters Cc: arch@freebsd.org Subject: Re: Sorting and Matching options for ls(1) Message-ID: <20020306201842.GS77980@elvis.mu.org> References: <3C862030.9080108@softweyr.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3C862030.9080108@softweyr.com> User-Agent: Mutt/1.3.27i Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG * Wes Peters [020306 12:05] wrote: > At the request of several FreeBSD users, I have developed the following > two options for ls(1): > > -M Display files that match the specified types only. The file > types are specified by a single character as in strmode(3), > with > the option to specify regular files as ``r'' instead of ``-'' > if > needed. > > -S Explicity specify the sorting order. The sorting flags are: EXAMPLES The following is how to do an ls listing sorted by size (and shows why ls does not need a separate option for this): ls -l | sort -n +4 Additionally, the -r flag to sort(1) may be used to get the results sorted from largest to smallest (a reverse sort). -- -Alfred Perlstein [alfred@freebsd.org] 'Instead of asking why a piece of software is using "1970s technology," start asking why software is ignoring 30 years of accumulated wisdom.' Tax deductible donations for FreeBSD: http://www.freebsdfoundation.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message