home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / unix / misc / 3341 < prev    next >
Encoding:
Internet Message Format  |  1992-08-22  |  2.9 KB

  1. Xref: sparky comp.unix.misc:3341 comp.unix.questions:10305 comp.sys.sgi:12785
  2. Newsgroups: comp.unix.misc,comp.unix.questions,comp.sys.sgi
  3. Path: sparky!uunet!stanford.edu!leland.Stanford.EDU!underdog
  4. From: underdog@leland.Stanford.EDU (Dwight Joe)
  5. Subject: Super-Duper Search Command, TLINKing!
  6. Message-ID: <1992Aug23.035024.4904@leland.Stanford.EDU>
  7. Summary: A summary of the responses and a request for help on TLINKing!
  8. Keywords: recap of Super-Duper search command, grep
  9. Sender: news@leland.Stanford.EDU (Mr News)
  10. Organization: Miners for a Heart of Gold
  11. References: <1992Aug20.051431.12803@leland.Stanford.EDU>
  12. Date: Sun, 23 Aug 92 03:50:24 GMT
  13. Lines: 53
  14.  
  15. In article <1992Aug20.051431.12803@leland.Stanford.EDU> underdog@leland.Stanford.EDU (Dwight Joe) writes:
  16. >...
  17. >It would be more useful to me if I could do the following:
  18. >
  19. >    alias skan  find . -exec grep $$ {} \; -print | pg
  20. >
  21. >Then, by typing "skan VALUE", I could look for the files with the
  22. >string "VALUE".  Is it possible to do an alias with a dummy argument
  23. >like "$$"?
  24. >If not, how could I do it?
  25. >Please send e-mail.
  26.  
  27. I received numerous replies, and here is the "best" one in terms of
  28. simplicity.  (And I just know that we _all_ love simplicity in the
  29. "hideous" maze we call Unix.)
  30.  
  31. I edited my .cshrc file to include the following command:
  32.  
  33.         alias skn 'find . -print | xargs grep \!:1 | pg'
  34.  
  35. To use this scan "skn" command, I do the following.
  36.  
  37.        skn bozo_the_clown
  38.  
  39. Then, the names of all files starting from my current level of the
  40. directory and below will be printed _if_ the accessed file has a
  41. string that matches "bozo_the_clown".
  42.  
  43. Anyhow, thanks for the response.  But I have yet another question.
  44. I am trying to create a symbolic link to a file.  I used the command
  45. "tlink" on the SGI system do just that.  So, for example,
  46.  
  47.       tlink source_directory destination_directory
  48.  
  49. creates an image of the source_directory in destination_directory.
  50. Any files in destination_directory only contain a _link_ to the original
  51. file in source_directory.  Unfortunately, some of the files didn't
  52. link properly and, in fact, did not appear in destination_directory
  53. even though they are in source_directory.
  54.  
  55. So, I wish to just tlink, one file at a time (instead of 1 directory
  56. at a time), each missing file whose image was not successfull copied
  57. to destination_directory when I tlinked at the directory-wide level.
  58. But I'm not sure how to tlink on a file by file basis.  How do you do it?
  59.  
  60. Please e-mail.  I will again post a summary.
  61.  
  62. -------------------------------------------------------------------------------
  63. Seikatsu no imi wa nan desu ka.            \|  |`      | Don't buy from Toyota;
  64. Shitte itara oshiete kuremasen ka.          | -+-      | especially, don't buy
  65.                                            /| / \      | from Capitol Toyota in
  66. Copyright 1992.                                        | San Jose, California.
  67. -------------------------------------------------------------------------------
  68.