Custom Search

ScriptLab - WIKI page

Got it go back Home

Search Command for all files from type class: find . -name *.class | xargs ls -lrt

Show connections to a specific host : lsof -i@HOST IP

SSH CONNECTION: ssh user@hostname

Replace all in VI: :%s#SOURCE#DESTINATION#q:

Print JSL/WSN : Printf “%d” 0xABCD (ABCD is the port number)

scp copies files between hosts on a network : scp -rp apx.tar apx12@anac93:/amssusrs3/bml/aimsys/apx12

check who is working on the ENV: who -u|grep $USER|rev|cut -f1 -d ' '|rev

to see all files (also hidden one) : ls -ltra

Extract TAR file: tar -xvf myfile_20030617.tar

create TAR file with all the subdirectories from API/ place : tar –cvf API.TAR API/

check the differences between the 2 files : diff -s .profile.ini.prod .profile.ini.prod.32

get the IP and info for the server: hostinfo

to check who is connecing to the TUXIDO server: ps -ef |grep $USER |grep jsl

Create soft link to storage: ln -s "where To" "Link Name"

Unix Command finds location of large files in account: du -sk *|sort –n

see number of lines in a file : cat -n .profile |more

List the open ports and the process that owns them: netstat -tulpn

Change owner: chown root:root install

Check java version: java -version

Listening ports(in that exmaple port 834): netstat -anp | grep 834

Login as root account. Open terminal and simply type the following command and enter you password: sudo bash # OR sudo -s

Find number of process connections to Oracle: ps -ef | grep oracle |grep -v grep|wc -l

start jBoss manually: nohup ./jboss-eap-6.0/bin/standalone.sh &

stop jBoss manually: ./jboss-eap-6.0/bin/shutdown.sh

Check the RAM : free -m

find red hat release: cat /etc/redhat-release

delete all files older then 5 days: find . -mtime +5 -type f -exec rm {} \;

to check if you are working on unix or linux: uname

host table: less /etc/hosts

List Java processes: jps

Extract zip: unzip