Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 6 Mar 2002 12:18:42 -0800
From:      Alfred Perlstein <bright@mu.org>
To:        Wes Peters <wes@softweyr.com>
Cc:        arch@freebsd.org
Subject:   Re: Sorting and Matching options for ls(1)
Message-ID:  <20020306201842.GS77980@elvis.mu.org>
In-Reply-To: <3C862030.9080108@softweyr.com>
References:  <3C862030.9080108@softweyr.com>

next in thread | previous in thread | raw e-mail | index | archive | help
* Wes Peters <wes@softweyr.com> [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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020306201842.GS77980>