home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.questions
- Path: sparky!uunet!gatech!concert!sas!mozart.unx.sas.com!sasmob
- From: sasmob@chewy.unx.sas.com (Mark C. Burhans)
- Subject: Re: A question on ls
- Originator: sasmob@chewy.unx.sas.com
- Sender: news@unx.sas.com (Noter of Newsworthy Events)
- Message-ID: <BuDG12.4Ly@unx.sas.com>
- Date: Thu, 10 Sep 1992 16:48:38 GMT
- Distribution: na
- References: <6786@tekig7.PEN.TEK.COM> <1992Aug29.233534.27967@umbc3.umbc.edu> <Uec1x2y00VolE4IFF=@andrew.cmu.edu>
- Nntp-Posting-Host: chewy.unx.sas.com
- Organization: SAS Institute Inc.
- Lines: 40
-
-
- In article <Uec1x2y00VolE4IFF=@andrew.cmu.edu>, sm86+@andrew.cmu.edu (Stefan Monnier) writes:
- |> 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 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)
-
- This will: ls -A | grep -v '\.Z$'
-
- This one will even search subdirectories: ls -AR | grep -v '\.Z$'
- --
- ---Mark C. Burhans---sasmob@chewy.unx.sas.com---919/677-8001 ext 7324
- SAS Institute, Inc., USA, SAS Campus Drive, Cary, NC 27513.
- "If you want a resume, I'll put it in writing. It's only good for a day
- and the contents are frightening." -- Lyrics by Harry Connick, Jr.
-
-