Re: How to list a directory "all except"

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: kitepilot@kitepilot.com
Date:  
To: Main PLUG discussion list
Subject: Re: How to list a directory "all except"
Or better yet:
ls -ltr | grep -vE 'htm$|somethingelse'
Look at '-i' (case insensitive) option too.
ET



sean ritzler writes:

> To answer your last question specifically:
>
> ls -ltr | grep -v htm$
>
> I don't know if ls has some sort of exclude option, so I would just use grep.
>
> Sean
>
> On Wed, Aug 7, 2013 at 8:04 AM, <> wrote:
>> What syntax would one use to list all the contents
>> of a directory *except* those of a specified criteria?
>>
>> For example, I know that: ls -ltr *htm
>> lists all contents ending in 'htm'
>>
>> But how could I list all contents excluding those ending in 'htm'?
>>
>>
>>
>> ---------------------------------------------------
>> PLUG-discuss mailing list -
>> To subscribe, unsubscribe, or to change your mail settings:
>> http://lists.phxlinux.org/mailman/listinfo/plug-discuss
> ---------------------------------------------------
> PLUG-discuss mailing list -
> To subscribe, unsubscribe, or to change your mail settings:
> http://lists.phxlinux.org/mailman/listinfo/plug-discuss

---------------------------------------------------
PLUG-discuss mailing list -
To subscribe, unsubscribe, or to change your mail settings:
http://lists.phxlinux.org/mailman/listinfo/plug-discuss