1 minute (0-59)
2 hour (0-23)
3 day of month (1-31)
4 month (1-12, or name such as jan, feb, etc)
5 day of week ( 0-6 (6 = Sunday) or name such as mon, tue,etc)
6 command to run

MAILTO=myemailaddress@example.com
every 10 minutes
*/10 * * * * /home/user/cmd.sh

every hour @ XX:59
59 * * * * /home/user/cmd.sh

every 3rd hr @ XX:59
59 */3 * * * /home/user/cmd.sh

everyday @ 4:59am
59 4 * * * /home/user/cmd.sh

every saturday @ 4:59am
59 4 * * 5 /home/user/cmd.sh

weekdays hourly from 9-5
59 09-17 * * 1-5 /home/user/cmd.sh

first of every month @4:59 am
59 4 1 * * /home/user/cmd.sh

first wednesday of every month @4:59 am
59 04 1-7 * 2 /home/user/cmd.sh

on reboot
@reboot /home/user/cmd.sh

Stop Mysql:
/etc/init.d/mysqld stop

Create a script to run the reset query
vi /root/mysql.reset.sql

add the reset query:
UPDATE mysql.user SET Password=PASSWORD(‘YOUR-NEW-MYSQL-PASSWORD’) WHERE User=’root’;
FLUSH PRIVILEGES;

execute the script:
# mysqld_safe –init-file=/root/mysql.reset.sql &

Sample output:
nohup: ignoring input and redirecting stderr to stdout
Starting mysqld daemon with databases from /var/lib/mysql
mysqld_safe[20970]: started

# killall mysqld
# /etc/init.d/mysql start

sh-3.2# wall
Type your message here
wall supports up to 20 lines

type control d to close

That will result in everyone on the system seeing your message regardless of wether mesg is enabled or not

Broadcast Message from me@JBook.local
(/dev/ttys001) at 21:13 CST...

Type your message here
wall supports up to 20 lines

type control d to close

another quick line is to

echo "Your message here" | wall

© 2012 James Border Suffusion theme by Sayontan Sinha