Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!samsung!dali.cs.montana.edu!ogicse!iwarp.intel.com!news From: merlyn@iwarp.intel.com (Randal Schwartz) Newsgroups: comp.unix.shell Subject: Re: copying files Keywords: cp Message-ID: <1990Dec7.180524.23145@iwarp.intel.com> Date: 7 Dec 90 18:05:24 GMT References: <1990Dec5.021951.28104@en.ecn.purdue.edu> <4615@umbc3.UMBC.EDU> <169@raysnec.UUCP> <1990Dec6.230153.14856@wpi.WPI.EDU> Sender: news@iwarp.intel.com Reply-To: merlyn@iwarp.intel.com (Randal Schwartz) Organization: Stonehenge; netaccess via Intel, Beaverton, Oregon, USA Lines: 36 In-Reply-To: fenn@wpi.WPI.EDU (Brian Fennell) In article <1990Dec6.230153.14856@wpi.WPI.EDU>, fenn@wpi (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) | >>| | > | >>Try | >> ls -d .* | > | > For some users on some systems, this will list both current directory | >(.) and parent directory (..), which is not what is required. Try instead: | > | > ls -d .??* | | ls -dal `ls -da .* | grep -v '^\.$' | grep -v '^\.\.$' ` | | sheeeeeesh OK, I'll take that as a challenge. Here it is in one less process, and *without* the shell globbing getting in the way: ls -dl `ls -a | egrep -v '^([^.].*|\.\.?)$'` (Don't have the shell see a wildcard unless you want the shell to glob it.) Just another Unix hacker, -- /=Randal L. Schwartz, Stonehenge Consulting Services (503)777-0095 ==========\ | on contract to Intel's iWarp project, Beaverton, Oregon, USA, Sol III | | merlyn@iwarp.intel.com ...!any-MX-mailer-like-uunet!iwarp.intel.com!merlyn | \=Cute Quote: "Intel: putting the 'backward' in 'backward compatible'..."====/