Skip to main content

Posts

Showing posts from 2017

How to generate Stub Code for a Java Client using cmd in Windows

Use the following steps to generate the stub code for a Java web services client application, using the  wsimport   tool that is included with the Java Development Kit. 1.  Copy the both *.xsd and *.wsdl file to JAVA bin directory. 2.  Open command prompt window and change to the directory to $JAVA_HOME/bin. 3. And type the below comment: C:\Program Files\Java\jdk1.7.0_76\bin>wsimport -keep -d "C:\Users\sub.kumar\Desktop\AG\classes" -s "C:\Users\sub.kumar\Desktop\A G\src" InboundPocProv.wsdl
Copy specific number of file from multiple files Step1. Go to the source directory Step 2 . Execute the below command.                mv `ls -p | grep -v / | tail -10` <destination dir> Note: where 10 is the number of files. -----------------------------------------------------------------------------------------------------------

Top Linux Basic Command

1.  To grep the pattern using awk command:                awk '{print $1,$2,$3,$4,$5,$6,$7}' <file_name> | sort | uniq -c | sort -nr | grep <pattern> 2. To grep the pattern from zipped(*.gz) file using awk command:                   awk '{print $1,$2,$3 }' <(gzip -dc <zipped_file_name>) | sort uniq -c | sort -nr | grep <pattern> 3. Copy the file from one server to another:             scp -r root@10.200.134.243:/<source-path> root@10.200.134.195:/<destination-path> 4. To monitor the log:                 tail –f  /var/log/atg/server.log                5. To find string the directory:                 grep -nr "string"  <my_directory> 6. To find directo...

Finding Oracle SID of a database

How to find oracle SID for database: 1. go to the ORACLE_HOME.                      cd $ORACLE_HOME 2. Follow the path : cd network/admin/ 3. Check the tnsnames.ora file:                   cat tnsnames.ora eg:           PRACT =   (DESCRIPTION =     (ADDRESS = (PROTOCOL = TCP)(HOST = agdb.int.bell.ca)(PORT = 2349))     (CONNECT_DATA =       (SERVER = DEDICATED)       (SERVICE_NAME = PRACT)     )   ) You will get the HOST, PORT and SID from here.