This is the series of pages that consists of UNIX commands which regularly used by the Middleware Admins/ Developers /Architects. The major focus on high performance in your hands to reach success with excellent tricks and templatising your work. We care about Solaris and Linux different commands that make more comfortable to play in your role..
Here is the simple way for thisLearning the UNIX Operating System
Ans: Use the following commands at your command prompt :
Here I assumed the old str as 'one', new str as 'two' all those files are in the same directory. if the those files are in different directory then you need to use one more loop to traverse the directory tree.
First you need to find whether the port is in use and established connection with other end points. Using netstat command you can find this port existing and running.
$ netstat -na |grep <portno>
In Solaris Port number associated with a process id is written into pfiles. By looking into the pfiles - meaning process file grep with port number. top most process indicated as initiator.
In Linux operating environment we can find the port associates with process with lsof command.
To view the Heavy size log files we cannot view them in normal vi editor. Split the file as per the required criteria you are looking for. assume that myfile is of size 10000KB or above we make 500KB block of files as follows:
$ split -b 500k myfile segment
In Solaris we have 2 options:
Esc 0(zero) takes you line starting point
Simple You need to press Esc and $ will takes you to the end of the line in the vi editor.
Sol: situations like want to search a path which contains symbol(special character) / to search with this symbol we need to use stuffing charecter and the stuffing char is reverse slash \.
egrep -e 'usage|else|if' startManagedWebLogic.sh
$ prtconf|grep Mem
Memory size: 32760 Megabytes
To Find the free Memory Size
sar -r 5 10
$ psrinfo -p
$ psrinfo -pv
13. How to get non-zero size file list
find logs -type f -size +0k | xargs ls
Ans: The command could be the combination of grep and awk with a looping as follows:
To resolve this first you need to use 'sort'command, then file with -r option to get unique data. Redirect those lines with filter '>' which will create a new file with non duplicate lines.
16. How to check the java version supports 32 bit or 64 bit?
truss -t exec java -d64 -version
How to debug what is inside happenings at system, internal files while running starting a new service?
The strace is a wonderful tool for debug, this must be aware by every middleware architect/admin/developer. While installing WebLogic or any software this will help to find what is happening internally, how the system calls happening. Where it is got stuck. A sample is as follows:$ strace -fv -o output -p <WL PID>
Good reference for ssh key-generation