find & symbolic links

Jeffrey Gleixner glex at uh.msc.umn.edu
Thu Jan 4 15:49:43 AEST 1990


	How can I use find to search through a symbolic link?

	I wrote a C program that, as an option, it will try to search
	through the files and list the name of the file that have 
	the matching string. 
	system("grep -l string `find . -print`") 
	but it bombs with:
	grep: Read error on ./"linked file": Is a directory 
		(it is a symbolic link to a directory). 

	Is it possible to ...
	grep -l string `find . (if it is -type l then cd to the file; 
		grep -l string...) -print` ???

	I know that the symbolicly linked directory won't have any
	links back to my directory.

	Can anyone help? 

	Thanks
glex at msc.umn.edu



More information about the Comp.unix.questions mailing list