Linux: finding files given text within…

after setting up the data source for my jbossportal,
i kinda need to play around with its layout and theme.
so i read the documentation,
but it was lacking on the files and its directories where those configurations can be found.

thanks to Nap:), he gave me a way of finding those with

find . -name ‘*.xml’ | xargs grep “phalanx”

first part, find . -name '*.xml' does find all xml files
second part, xargs which tells to operate on each of those files
finally , grep "phalanx" which text contained within the files i’m looking for.

after it returned the files i needed,
did the configuration and played with the layout of jbossportal.

oh, by the way, the output is kinda like this…

./server/default/deploy/jboss-portal.sar/portal-core.war/WEB-INF/portal-layouts.xml: phalanx
./server/default/deploy/jboss-portal.sar/portal-core.war/WEB-INF/portal-layouts.xml: /phalanx/index.jsp
./server/default/deploy/jboss-portal.sar/portal-core.war/WEB-INF/portal-layouts.xml: /phalanx/index.jsp
./server/default/deploy/jboss-portal.sar/portal-core.war/WEB-INF/portal-layouts.xml: /layouts/phalanx/maximized.jsp
./server/default/deploy/jboss-portal.sar/portal-core.war/WEB-INF/portal-layouts.xml: /layouts/phalanx/maximized.jsp
./server/default/deploy/jboss-portal.sar/portal-core.war/WEB-INF/portal-themes.xml: nphalanx
./server/default/deploy/jboss-portal.sar/portal-core.war/WEB-INF/portal-themes.xml:
./server/default/deploy/jboss-portal.sar/portal-core.war/WEB-INF/portal-themes.xml:
./server/default/deploy/jboss-portal.sar/conf/data/default-object.xml: phalanx
./server/default/deploy/jboss-portal.sar/conf/data/default-object.xml: phalanx
./server/default/deploy/jboss-portal.sar/META-INF/jboss-service.xml: phalanx

SPEAK / ADD YOUR COMMENT
Comments are moderated.

You must be logged in to post a comment.

Return to Top