Friday, August 9, 2013

How to get Unix Timestamp in Bash?


Simply use: 

date +%s

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.