Scripting

Updating WordPress using a bash script

If you have shell access to your webserver this script can be used to upgrade your WordPress installation to the latest version quickly. Always remeber to backup your database and installation files before running it! Do change the bold text to reflect your WordPress Internet address before you run the script. #!/bin/bash CURDIR=$(pwd) SITE=”http://yoursite.com/wordpress” echo […]

Read More
Scripting

Script to backup MySql database

#!/bin/bash # Shell script to backup MySql database # To backup Nysql databases file to /backup dir and later pick up by your # script. You can skip few databases from backup too. MyUSER=”SET-MYSQL-USER-NAME” # USERNAME MyPASS=”SET-PASSWORD” # PASSWORD MyHOST=”localhost” # Hostname # Linux bin paths, change this if it can’t be autodetected via which […]

Read More
Linux

Find domain expiration date

To get expiration date use grep command: $ whois nixcraft.com | egrep -i ‘Expiration|Expires on’ Output: Expiration Date: 10-may-2009 NOTICE: The expiration date displayed in this record is the date the currently set to expire. This date does not necessarily reflect the expiration view the registrar’s reported date of expiration for this registration. Expires on: […]

Read More