Category Archives: bash

Install Orta GTK Theme using Ubuntu PPA

To add the ppa and install the theme and the settings manager, type this on a terminal :

sudo add-apt-repository ppa:nikount/orta-desktop
sudo add-apt-repository ppa:tiheum/equinox
sudo apt-get update
sudo apt-get install orta-theme
sudo apt-get install faenza-icon-theme

To install the emerald decorators :

sudo apt-get install orta-emerald-decorators

To install the Xfwm4 decorators :

sudo apt-get install orta-xfwm4-decorators

source: ubuntugeek “reposted on blog for personal reference”

Cron Hack running job/script every 5 seconds

what is Cron?

Cron is a time-based job scheduler in Unix-like computer operating systems. ‘cron’ is short for ‘chronograph’.

Cron is the name of a program that enables unix users to execute commands or scripts (groups of commands) automatically at a specified time/date. It is normally used for system admin commands, like makewhatis, which builds a search database for the man -k command, or for running a backup script, but can be used for anything. A common use for it today is connecting to the internet and downloading your email.

Cronjob Hack, running job/script every 5 seconds or something but lesser than a gap of one minute. i made the script to display a log file with time stamp LOGFILE=/root/username/logs/log_`date +%H%M%S`.log so that you can check if your cron is working or not, and you can disable it anytime,

crontab -e

add this on your crontab

*/1 * * * * /scripts/

#! /bin/bash
LOGFILE=/root/username/logs/log_`date +%H%M%S`.log

while [ ${x} -gt 0 ]
/usr/bin/php /home/username/public_html/scripts/file.php >> $LOGFILE
sleep 5

save as