home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / unix / shell / 5226 < prev    next >
Encoding:
Text File  |  1993-01-02  |  1.6 KB  |  45 lines

  1. Newsgroups: comp.unix.shell
  2. Path: sparky!uunet!spool.mu.edu!agate!dog.ee.lbl.gov!hellgate.utah.edu!csn!cherokee!uswmrg!engineer.mrg.uswest.com!chris
  3. From: chris@engineer.mrg.uswest.com (Chris Fedde)
  4. Subject: Re: need a bit of help in
  5. Message-ID: <1993Jan2.014804.7915@uswmrg.mrg.uswest.com.mrg.uswest.com>
  6. Organization: USWEST Marketing Resources
  7. NntpPostingHost: engineer.mrg.uswest.com
  8. References: <1993Jan1.195022.23031@mnemosyne.cs.du.edu>
  9. Date: 02 Jan 93 06:48:04 GMT
  10. Lines: 33
  11.  
  12. In article <1993Jan1.195022.23031@mnemosyne.cs.du.edu> rduta@nyx.cs.du.edu (Radu) writes:
  13. >
  14. >Ok, tow things:
  15. >1) I want a method of copying whole directories.  I'm used to the mac where
  16. >   you can just drag folders form one dir to another and it moves it or
  17. >   copies it.  I want something similar for unix.  The thing is that I
  18. >   Haven't the slightest idea how to start.
  19. >
  20.  
  21. there are lots of ways to do this.  Normaly I use
  22.     find source_dir print | cpio pcvd
  23. there is a way to do this using tar too.
  24.     (cd src; tar cf  . )| (cd dst; tar xvf )
  25. Does someone else have easier ways?
  26.  
  27. >2) I was wandering what is the easiest way to do a recursive grep, where
  28. >   it searches all the files in all dirs.  I was thinking something along
  29. >   the lines of "grep R string *" but the "R" flag is not an option.
  30. >
  31. >any ideas?
  32. >
  33. >
  34.  
  35. I used the below command to locate a reference in my Mail folder
  36.     find Mail exec grep string {} \; | more
  37. Be carefull though.  this will also grep ALL files, text and non text.
  38. the command won't break but the output can be confusing.
  39.  
  40.     good luck
  41.     chris
  42.  
  43.  
  44. Chris Fedde, USWEST MRG, chris@mrg.uswest.com, voice +13037842823
  45.