copying files

Bruce Steinke bsteinke at es.com
Fri Dec 14 05:43:36 AEST 1990


In article <1990Dec13.171546.7020 at smsc.sony.com>, tin at smsc.sony.com (Tin Le) writes:
|> In article <1990Dec5.021951.28104 at en.ecn.purdue.edu> nichols at en.ecn.purdue.edu (Scott P Nichols) writes:
|> >
|> >OK, let me restate my question, as none of the answers 
|> >I recieved last time worked...
|> >
|> >Here is a listing of my home directory...
|> >(I use csh)  
|> >
|> >% ls -la
|> >
|> >total 92
|> >drwxr-xr-x 10 nichols      1024 Dec  4 16:52 .
|> >drwxr-xr-x312 root         6144 Nov 25 17:14 ..
|> >-rw-------  1 nichols      1837 Dec  4 09:49 .cshrc
|> >drwx------  2 nichols      1024 Dec  4 16:42 .elm
|> >-rwxr--r--  1 nichols         0 Oct 19 01:35 .hushlogin
|> >-rw-r--r--  1 nichols        26 Dec  1 14:30 .informrc
|> >>>>>>>>>>>>>>>>>> other .files excluded <<<<<<<<<<<<<<<
|> >drwx------  2 nichols      1024 Dec  4 08:37 Mail
|> >drwx------  5 nichols      1024 Dec  2 18:59 News
|> >>>>>>>>>>>>>>>> other directories excluded <<<<<<<<<<<<<<
|> >
|> >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) 
|> >
|> >When I type...                I get...
|> >______________                ________
|> >
|> >ls .*                         all of the dot files, then all files
|> >                              in my directory and the previous.
|> >
|> >ls .**                        all of the dot files, then all files
|> >                              from the previous directory
|> >
|> >ls * .???                     all files in all of my directories
|> >
|> >Any other suggestions?
|> 
|> 
|>    Since you are using csh, how about some regex?  Try this:
|> 
|> [tin] rn31 242 >/bin/ls .[a-zA-Z0-9]*
|> .Xdefaults     .jobdir        .oldnewsrc     .rnlast        .xinitrc.rn31
|> .Xinitrc       .letter        .phones        .rnlock        .xinitrc.save
|> .article       .login         .plan          .rnsoft
|> .calendar      .mailrc        .pnewsexpert   .sh_history
|> .cshrc         .mwmrc         .profile       .signature
|> .exrc          .newsrc        .rhosts        .twmrc
|> [tin] rn31 243 >
|> 
|>    Seems to do what you wanted above.
|> 
|> -- Tin
|> 
|> -- 
|> .----------------------------------------------------------------------
|> . Tin Le                    Work Internet: tin at smsc.Sony.COM
|> . Sony Microsystems              UUCP: {uunet,mips}!sonyusa!tin
|> . Work: (408) 944-4157      Home Internet: tin at szebra.uu.net

How about this alternative (easier to type):

	ls -ad .*	-or-
	ls -ald .*	-long listing-

This works for me...

-Bruce
-- 
  Bruce F. Steinke                  | "And the road goes ever on..."
  bsteinke at dsd.es.com               |  Bilbo Baggins
  Evans & Sutherland Computer Corp. |
  Salt Lake City, Utah              |  No moss under these feet!



More information about the Comp.unix.shell mailing list