Results 1 to 2 of 2
I use the command ln -s a lot to create symbolic links.
The problem is that I need to run a routine that looks for a specific string in ALL ...
- 07-18-2010 #1Just Joined!
- Join Date
- Apr 2003
- Posts
- 52
distinguishing a virtual vs. physical folder
I use the command ln -s a lot to create symbolic links.
The problem is that I need to run a routine that looks for a specific string in ALL of my websites and I'd do it somehting like this:
however, it's going to recurse all the "folders" and include symbolic links which I don't wish to do. Is there any way to prevent this?Code:cd /home grep -R "function_enhanced_mail_v100.php" *
Thanks,
Samuel
- 07-18-2010 #2Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,974
I would use the find command, which can be set to search or skip symbolic links to directories, and tell it to execute the grep command on files it finds if necessary.
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!


Reply With Quote