File related commands

1) find text in the matching files and show the filename with the pattern. The below example shows the list of filenames and the location of the hostname in those files, which will be helpful when changing hostnames for your websphere installation.

find . -name ‘*.xml’ -print | xargs grep ‘hostName’ /dev/null

bash-2.05b# find /usr/IBM/WebSphere/AppServer/profiles/AppSrv01/config/ -name ‘server*.xml’ -print | xargs grep ‘hostName’ /dev/null | more
/usr/IBM/WebSphere/AppServer/profiles/AppSrv01/config/cells/portalserverCell01/nodes/portalserverNode01/serverindex.xml:<SERVERINDEX:ServerIndex xmi:version=”2.0″ xmlns:xmi=”http://www.omg.org/XMI” xmlns:serverindex=”http://www.ibm.com/websphere/appserver/schemas/5
.0/serverindex.xmi” xmi:id=”ServerIndex_1″ hostName=”portalserver.example.com” endPointRefs=”NamedEndPoint_1130375480667 NamedE
ndPoint_1130375480668 NamedEndPoint_1130375480669 NamedEndPoint_1130375480670 NamedEndPoint_1130375480671 NamedEndPoint_113037548067

Yazının tamamını okuyun (read more) »

Yorum (comment) (0)