| Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#21
|
| In article >Hej Thommy! > >It was just missing from the man page. > >I filed bug 4382701 against the man page for Solaris 9 in Oct 2000. I am sure it was already in the SunOS-5.4 man page. -- EMail:joerg-at-schily.isdn.cs.tu-berlin.de (home) Jörg Schilling D-13353 Berlin js-at-cs.tu-berlin.de (uni) schilling-at-fokus.fraunhofer.de (work) Blog: http://schily.blogspot.com/ URL: http://cdrecord.berlios.de/old/private/ ftp://ftp.berlios.de/pub/schily |
|
#22
|
| Thomas Tornblom wrote: > Hej Thommy! Tjenare Thomas, läget? > It was just missing from the man page. > > I filed bug 4382701 against the man page for Solaris 9 in Oct 2000. But I learned find in the 1980's you know... Hope this "new" stuff can finally stick. ;-) |
|
#23
|
| Casper H.S. Dik wrote: > Stefaan A Eeckels > >> On Wed, 13 Jun 2007 20:10:38 GMT >> "Thommy M." > > >>> Someone who can say when '+' become available in Solaris find ??? > >> It's already available on Solaris 2.6 (I checked it just now). Maybe >> even earlier, but I no longer have access to older versions of Solaris. > > > The source code suggests it was already in 2.0. > > But it wasn't documented until much later. Old habits stick. However I hope I've learned the '+' ending of the -exec switch now. |
|
#24
|
| Casper H.S. Dik wrote: >>> Someone who can say when '+' become available in Solaris find ??? > > The source code suggests it was already in 2.0. From the austin-group list [1], quoted to avoid media break | From: David Korn | Date: Mon, 26 Mar 2001 11:09:54 -0500 (EST) | | I wrote the version of find that went into System V Release 4 version back | in 1987 and added the feature of accepting + in place of ; to allow xargs | type grouping without the quoting problems. I was concerned that | xargs did not handle newlines. Earlier versions of find had their | own file tree walker code which did not handle symbolic links. | I wrote ftwalk() (later renamed nftw()) and then wrote find using that | interface. | | Our current find implementation (the AST software), also supports -print0 | but I would recommend against this since the output format | is no longer a text file that can be processed by many of the | standard utilities. BTW: there's a bug in recent AST releases: you have to omit the braces to really get the expected behaviour (i've submitted a report). [1] http://opengroup.org/austin/mailarch.../msg03065.html -- |
|
#25
|
| If I am understanding you correctly, you want the name of a file that has a string in it, not the line in the file that has a string in it. If that is correct, here is the command I normally use on Solaris: find DIRECTORY -type f -print | xargs -i grep -il "{}" The above ignores the cases of the string and the case of the text in the file. If you want to match case, try: find DIRECTORY -type f -print | xargs -i grep -l "{}" The above two works even if there are blanks in the file name. On Jun 12, 9:34 am, mar...@yahoo.com wrote: > I've been trying to search for a text sting in all files on the drive. > The following works , BUT the actual file name is not returned (only > the string occurence is printed). What else do I need??? > > find /opt/icor/fx -exec grep "text string" {} \; > > Thanks a llot, > Mark |
|
#26
|
| If I am understanding you correctly, you want the name of a file that has a string in it, not the line in the file that has a string in it. If that is correct, here is the command I normally use on Solaris: find DIRECTORY -type f -print | xargs -i grep -il "STRING" "{}" The above ignores the cases of the string and the case of the text in the file. If you want to match case, try: find DIRECTORY -type f -print | xargs -i grep -l "STRING" "{}" The above two works even if there are blanks in the file name. Replace DIRECTORY and STRING with their correct values. On Jun 12, 9:34 am, mar...@yahoo.com wrote: - Hide quoted text - On Jun 12, 9:34 am, mar...@yahoo.com wrote: > I've been trying to search for a text sting in all files on the drive. > The following works , BUT the actual file name is not returned (only > the string occurence is printed). What else do I need??? > > find /opt/icor/fx -exec grep "text string" {} \; > > Thanks a llot, > Mark |
![]() |
| Thread Tools | |
| Display Modes | |