Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!spool2.mu.edu!news.cs.indiana.edu!purdue!spaf From: spaf@cs.purdue.EDU (Gene Spafford) Newsgroups: comp.unix.shell Subject: Re: copying files Message-ID: <12758@medusa.cs.purdue.edu> Date: 14 Dec 90 01:48:08 GMT References: <1990Dec5.021951.28104@en.ecn.purdue.edu> <4615@umbc3.UMBC.EDU> <1990Dec6.230153.14856@wpi.WPI.EDU> <24@kaspar.UUCP> <4914@mahendo.Jpl.Nasa.Gov> Sender: news@cs.purdue.EDU Reply-To: spaf@cs.purdue.edu (Gene Spafford) Organization: Department of Computer Science, Purdue University Lines: 19 How to list all non . and .. files/directories in the current directory that start with . without using pipes (Bourne shell or ksh): ls -ad .[!.] .??* -or- echo .[!.] .??* Why: ls or echo (obvious) -ad on ls (so we don't list directory contents of .name) .[!.] (all 2-character names starting with . EXCEPT ..) .??* (all 3+ character names starting with .) It is permissible in this game to use more than one argument to a command, is it not? :-) -- Gene Spafford NSF/Purdue/U of Florida Software Engineering Research Center, Dept. of Computer Sciences, Purdue University, W. Lafayette IN 47907-2004 Internet: spaf@cs.purdue.edu uucp: ...!{decwrl,gatech,ucbvax}!purdue!spaf