C3lm@xM0vil
grep "HTTP" server.startup.log
zgrep ", IMSI" MM1_02_10_2018_10* | zgrep "404809901000113"
ps -ef |grep java |grep -v bcgiapp |grep -v "grep java" |awk -F" " '{print " " $2 "
" $3 " " $5 " " $24}'
find /app2/jboss-5.1.0.GA/server/smfagent/log -name \*.txt -mtime +9 -exec gzip
{} \;
1. #dmidecode | grep -m1 'Product Name' ==========> To find Product
name
2. #getconf LONG_BIT ==========> To know either 32 bit
or 64 bit
3. #hostname ==========> To know the hostname
4. #hostname -i ==========> To know the host IP
Address
#/sbin/ifconfig ==========> To know the IP
Address of current host
5. #cat /etc/redhat-release ==========> To know the LINUX
release version
6. #mpstat -P ALL ==========> To know each CPU
Utilization
7. #cat /proc/cpuinfo | grep processor | wc -l
==========> To know number of CPUs working on a
machime
8. #cat /proc/meminfo ==========> To find the RAM size
9. #fdisk -l | grep Disk ==========> To find Hard disk size
10. #cat /proc/meminfo ==========> To find the RAM size
11. #find <dir name> -name 'search file'
==========> To search a file
12. #grep -i 'Search data' <filename> ==========> To search data in a file
# grep 'string' filename ======> To display the files those contain the string
Ex: grep 'updateAcc' server.log.2015-09-*
#ls -lrt | grep 'CAPSL1_07_01_2016_14_*' =====> To display the files with given
string in filename.
13. #tcpdump -i any proto SCTP -s 1500 -w /apps/Traces/bellam &
=========> To start pcap process
14. #cat 0210[0-6]102013*|grep "EF"|gawk -v FIELDWIDTHS='3 6 8 6 11 10 10 4 2 2
10:q!' -v OFS=',' '$1=$1'>>sample.txt
==========> To get PTF file.
15. #sqlplus PMDIEMO/PMDIEMO@10.70.70.52/diemo
==========> To connect to PM DB
16. #telnet <ipnumber> <port> ===========> To check the inter connectivity
between two linux servers
17. #quit ===========> To come out from telnet
connection
18. #scp -r ipnumber <Source folder> <Destination User name>@IP Adress:<folder
name>
To copy files from one server to other server when there is a internal
connection
example: scp -r 10.141.24.52 /apps diemo@10.141.24.156:/apps/app2
XX. to check ports physical sttaus
#ethtool eth2
19. #chown -R diemo:diemo /apps/ ===========> To change the owner of a
directory/file
(The directory will be accessed by
specific user only)
20. To add a user in sudo users list
i) visudo /etc/sudoers
ii) visudo -f /etc/sudoers
Now add the user and then exit.
21. # echo "This is the message body" | mutt -a test.txt -s "Test"
naveen.bellapu@xius.com
==========> To check test mails from linux server
22. # model ===========> To find product name on UNIX server.
23. #wget https://api.silverstreet.com/send.php?
username=dineroenmovimiento&password=dineroen123&destination=584123266238&sender=si
lver&body=Tu%20cuenta%20Diemo%20fue%20acreditada%20por%20Bs.%2010.00.%20Tu%20saldo
%20actual%20es%20Bs.%20697.94
=========> To get some data without login into a
server.
24. #uptime ==========> Gives how long the system has been
running
25. #netstat =========> Netstat prints information about
the Linux networking subsystem.
26. #utmp ===========> allows one to discover information about
who is currently using the system
27. #grep '1099' -R * | more ==========> To search a word in the whle
directory
28 # %s#10.14.245.89:8150#10.42.245.86:8150#g
========> To replace a word with another one in vi
editor
29.#find . -name "CAP_ASN2_*_0*_07_2015-*.dat.gz" -print | xargs rm
=========> delete command
30. find . -mtime +30 -exec rm -f {} \;
--> removes 30 days old files
31. for finding port number
command:- grep "Initializing Coyote HTTP" server.log.*
or
grep Starting Coyote HTTP/ server.log.*
32.ls -lrth /proc/10632/exe