home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / unix / question / 10536 < prev    next >
Encoding:
Internet Message Format  |  1992-08-30  |  1.7 KB

  1. Path: sparky!uunet!ogicse!das-news.harvard.edu!cantaloupe.srv.cs.cmu.edu!crabapple.srv.cs.cmu.edu!andrew.cmu.edu!sm86+
  2. From: sm86+@andrew.cmu.edu (Stefan Monnier)
  3. Newsgroups: comp.unix.questions
  4. Subject: Re: A question on ls
  5. Message-ID: <Uec1x2y00VolE4IFF=@andrew.cmu.edu>
  6. Date: 29 Aug 92 17:07:14 GMT
  7. Article-I.D.: andrew.Uec1x2y00VolE4IFF=
  8. References: <6786@tekig7.PEN.TEK.COM> <1992Aug29.233534.27967@umbc3.umbc.edu>
  9.     <1992Aug29.235425.26762@mcc.com>
  10. Distribution: na
  11. Organization: Junior, Math/Computer Science, Carnegie Mellon, Pittsburgh, PA
  12. Lines: 35
  13. In-Reply-To: <1992Aug29.235425.26762@mcc.com>
  14.  
  15. Excerpts from netnews.comp.unix.questions: 29-Aug-92 Re: A question on
  16. ls Bill Bohrer@mcc.com (1088)
  17.  
  18. > In article <1992Aug29.233534.27967@umbc3.umbc.edu>
  19. > rouben@math9.math.umbc.edu (Rouben Rostamian) writes:
  20. > >In article <6786@tekig7.PEN.TEK.COM> naren@tekig5.pen.tek.com (Naren
  21. > Bala) writes:
  22. > >>If I type
  23. > >>% ls *.Z 
  24. > >>All files with .Z extension are displayed.
  25. > >>
  26. > >>What command would I type to display all files that do not have a .Z 
  27. > >>extension ?
  28. > >
  29. > >The wildcards are expanded by the shell, so the answer is: it depends on
  30. > >the shell you are using.  In tcsh, you type:
  31. > >% ls ^*.Z
  32. > >In sh and csh you are out of luck.  In other shells, I don't know.
  33. >  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  34.  
  35. > Not true, this should work in ALL shells:
  36.  
  37. > ls | grep -v '.Z'
  38.  
  39. All this is true, but don't forget that it won't list ALL the files
  40. ending in .Z
  41. the files beginning with a point will be 'forgotten' !
  42. (I had quite a surprise a week ago)
  43.  
  44.     Stefan Monnier
  45.  
  46.  
  47. -----------------------------------------------------
  48. -- On the average, people seem to be acting normal --
  49. -----------------------------------------------------
  50.