ls -A

David C Lawrence tale at pawl.rpi.edu
Mon Oct 9 07:21:00 AEST 1989


In <1989Oct7.032907.27496 at rpi.edu> I <tale at pawl.rpi.edu> wrote in
response to Michael's claim that special treatment of shell expansion
of * was necessary to not include . files so that rm wouldn't remove
`.' and `..'.

In <MRD.89Oct7205748 at sun.clarkson.edu> mrd at sun.clarkson.edu (Michael DeCorte):
Michael> how about:
Michael> grep foo * 
Michael> cat * | foo
Michael> tar -cf - * # opps grab . and .. in this one [...]
Michael> echo * | cpio -o > /dev/tape # see above

How about them?  This whole thing is an outgrowth of, "I want to see
all files but not `.' and `..'" and the combined conspiracy (in Steve
Summit's words) of ls and shell globbing to hide .files.  What about
when I do want to grep all of the files (but not . and ..) in the
current directory?  Shell globbing alone is not sufficient for this
where .files exist.

Michael> sure if you want to be consistent then the shell include . files
Michael> but it often (usaully?) not what you want it to do.

Yes, often.  I am not so sure about usually though.  Except in my own
home directory, I usually want to know what all the entries in a
directory are.

Michael> Plus I really don't want to see the 51 .* files that I have in my ~
Michael> directory [...]

I think Steve Summit <scs at hstbme.mit.edu> had a very good comment
about this in <14611 at bloom-beacon.MIT.EDU>.  I agree with most of his
comments in the article.

Steve> I've never understood [...] why a simple bijection based on the
Steve> first character of the filename is a useful and general
Steve> selection model.

Dave
--
 (setq mail '("tale at pawl.rpi.edu" "tale at itsgw.rpi.edu" "tale at rpitsmts.bitnet"))



More information about the Comp.unix.wizards mailing list