Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!world!kaspar!ires From: ires@kaspar.UUCP (Bruce R. Larson) Newsgroups: comp.unix.shell Subject: Re: copying files Summary: A single pipe is all that's needed Keywords: cp Message-ID: <24@kaspar.UUCP> Date: 9 Dec 90 02:15:35 GMT References: <1990Dec5.021951.28104@en.ecn.purdue.edu> <4615@umbc3.UMBC.EDU> <1990Dec6.230153.14856@wpi.WPI.EDU> Lines: 40 In article <1990Dec6.230153.14856@wpi.WPI.EDU>, fenn@wpi.WPI.EDU (Brian Fennell) writes: > In article <169@raysnec.UUCP> shwake@raysnec.UUCP (Ray Shwake) writes: > >rouben@math13.math.umbc.edu (Rouben Rostamian) writes: > > > >>In article <1990Dec5.021951.28104@en.ecn.purdue.edu> nichols@en.ecn.purdue.edu (Scott P Nichols) writes: > >>| > >>|Do any of you UNIX wizards know how to even list all of > >>|the names of the files which begin '.' (besides, of course > >>|the files in the root (second line of list) > >>| > > ls -dal `ls -da .* | grep -v '^\.$' | grep -v '^\.\.$' ` > > sheeeeeesh Are you guys still talking about this? Sheeeesh indeed! Sorry Brian, but did you try your solution? It lists both `.' and `..'. The fellow who suggested `ls -ld .*' gave the best non-pipe solution to date. You can get rid of the `.' entry by listing filenames with at least 2 chars. ls -ld .?* The only undesirable entry remaining is `..'. If you absolutely *have* to get rid of the `..' you can do this: /bin/ls -ld .?* | grep -v ' \.\.$' [NOTE: Use /bin/ls or equivalent to avoid aliased ls's and locally modified ls's.] If we don't put this one rest soon we'll start getting awk and perl and who-knows-what-else solutions. B