Wednesday, December 18, 2013

Crontab format

format of /etc/crontab:
# .---------------- minute (0 - 59)
# |  .------------- hour (0 - 23)
# |  |  .---------- day of month (1 - 31)
# |  |  |  .------- month (1 - 12) OR jan,feb,mar,apr ...
# |  |  |  |  .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
# |  |  |  |  |
# *  *  *  *  * user-name  command to be executed

Thursday, November 14, 2013

Disabling weak ciphers in Tomcat


In order to disable weak ciphers, please modify your SSL Connector, container attribute inside server.xml with the following information:


ciphers="SSL_RSA_WITH_RC4_128_SHA,TLS_RSA_WITH_AES_128_CBC_SHA,TLS_DHE_RSA_WITH_AES_128_CBC_SHA,TLS_DHE_DSS_WITH_AES_128_CBC_SHA,SSL_RSA_WITH_3DES_EDE_CBC_SHA,SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA,SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA"

Monday, November 11, 2013

Thursday, August 1, 2013

sed command to Insert a line before the last line of the file.


sudo sed -ie '$ i tomcat7 hard nofile 32768' /etc/security/limits.conf

This command will insert the entry "tomcat7 hard nofile 32768" before the last line of the file limits.conf. 


Friday, July 26, 2013

tar command to preserve file permissions?


Creating Tar: 

tar -pcvzf xxx.tar.gz ABC

Extracting: 

tar -pxvzf xxx.tar.gz ABC


Where, 
p == preserve permissions
c == create archive
v == verbose (print names while making tar)
z == gzip
f == tar file name