Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Thought this was helpful...
nipper
For those of you (on unix) that want a list of files that contain a certain string in a large directory. I use it to search for perl lcoations in this example:
find /iw-home -name "*.*pl" -print | xargs grep -l "#!/iw-home" | more
gives a list like this :
/iw-home/private/bin/iwanalyze.ipl
/iw-home/private/bin/iwanalyzetool.ipl
/iw-home/tmp/test.pl
/iw-home/examples/Templating/workflow/author_submit_dcr-0.ipl
/iw-home/examples/Templating/workflow/author_submit_dcr-3.ipl
/iw-home/OpenDeployNG/solutions/perl/iwodstart.ipl
/iw-home/datadeploy/bin/iwdd.ipl
HTH
Andy
Find more posts tagged with
Comments
13adam13
You could also say:
find /iw-home -name "*pl" -exec grep -l "#!/iw-home" {} \; | more
or
for filename in `find /iw-home -name "*.pl"`;
do
grep -l "#!iw-home" $filename
done