Wednesday, July 27, 2011

To check version of linux installed

# To check version of linux installed
Solaris

cat /etc/release

# To check version of SLES SUSE installed

cat /etc/issue


install does not work in linux version for IHS 6.1 installer

If ./install does not work in linux/SUSE for IHS 6.1 installer

then use,

java -jar setup.jar

Wednesday, July 20, 2011

Find and replace text/characters in solaris/linux

Following command will search for files having name containing "hell" containing word  Hello and replace it with Hi.

# find and replace solaris
find ./* -name "hell*" -exec perl -pi -e 's/Hello/Hi/' {} \;

# find and replace in linux
 find ./* -name "hell*" -exec sed -i 's/Hello/Hi/' {} \;

Getting windows service name and Killing a windows service

taskkill /PID <PID> /F <Force if required>

#To know the PID for a windows service:

sc queryex <Service Name>