Linux Scripts


tux

View filesystem volume size

df -H

Check a domain’s SSL capabilities

openssl s_client -connect your.domain.com:443

If ‘apachectl restart’ doesn’t cause changes to your ssl.conf or httpd.conf files to enact, you can run the following

/etc/init.d/httpd restart

Check Linux and httpd versions on CentOS

Get Apache version:

httpd -v
*or*
apachectl -v

Get CenOS version:

cat /etc/redhat-release
*or*
cat /etc/centos-release

Delete files older than 2 days

find /var/backup/* -mtime +2 -exec rm {} \;

Compress files using Tar & BZ2 and create a dated backup file

tar cvfj /var/backup/backupfile$(date +%Y-%m-%d_%H%M).tar.bz2 /var/www/html