home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!ogicse!das-news.harvard.edu!cantaloupe.srv.cs.cmu.edu!crabapple.srv.cs.cmu.edu!andrew.cmu.edu!sm86+
- From: sm86+@andrew.cmu.edu (Stefan Monnier)
- Newsgroups: comp.unix.questions
- Subject: Re: A question on ls
- Message-ID: <Uec1x2y00VolE4IFF=@andrew.cmu.edu>
- Date: 29 Aug 92 17:07:14 GMT
- Article-I.D.: andrew.Uec1x2y00VolE4IFF=
- References: <6786@tekig7.PEN.TEK.COM> <1992Aug29.233534.27967@umbc3.umbc.edu>
- <1992Aug29.235425.26762@mcc.com>
- Distribution: na
- Organization: Junior, Math/Computer Science, Carnegie Mellon, Pittsburgh, PA
- Lines: 35
- In-Reply-To: <1992Aug29.235425.26762@mcc.com>
-
- Excerpts from netnews.comp.unix.questions: 29-Aug-92 Re: A question on
- ls Bill Bohrer@mcc.com (1088)
-
- > In article <1992Aug29.233534.27967@umbc3.umbc.edu>
- > rouben@math9.math.umbc.edu (Rouben Rostamian) writes:
- > >In article <6786@tekig7.PEN.TEK.COM> naren@tekig5.pen.tek.com (Naren
- > Bala) writes:
- > >>If I type
- > >>% ls *.Z
- > >>All files with .Z extension are displayed.
- > >>
- > >>What command would I type to display all files that do not have a .Z
- > >>extension ?
- > >
- > >The wildcards are expanded by the shell, so the answer is: it depends on
- > >the shell you are using. In tcsh, you type:
- > >% ls ^*.Z
- > >In sh and csh you are out of luck. In other shells, I don't know.
- > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
- > Not true, this should work in ALL shells:
-
- > ls | grep -v '.Z'
-
- All this is true, but don't forget that it won't list ALL the files
- ending in .Z
- the files beginning with a point will be 'forgotten' !
- (I had quite a surprise a week ago)
-
- Stefan Monnier
-
-
- -----------------------------------------------------
- -- On the average, people seem to be acting normal --
- -----------------------------------------------------
-