copying files

Gene Spafford spaf at cs.purdue.EDU
Fri Dec 14 12:48:08 AEST 1990


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 at cs.purdue.edu	uucp:	...!{decwrl,gatech,ucbvax}!purdue!spaf



More information about the Comp.unix.shell mailing list