Skip to main content

Posts

Showing posts from August, 2008

How to set a crontab

How to Use the Cron and Crontab commands The 'Cron' Command The cron command starts a process that executes commands at specified dates and times. Regularly scheduled commands can be specified according to instructions found in the crontab files in the directory /var/spool/cron/crontabs. Users can submit their own crontab files via the crontab command. The 'Crontab' Command Crontab copies the specified file or standard input if no file is specified, into a directory that holds all users' crontab s. SYNOPSIS : crontab [file] crontab -e [-u username] crontab -r [-u username] crontab -l [-u username] The -e option edits a copy of the current users' crontab file or creates an empty file to edit if crontab does not exist. The -r option removes a user's crontab from the crontab directory. The -l options lists the crontab file for the invoking user. Setting up a Crontab job A crontab file consists of lines of six fields each.The fields are separated by

Dia, a Drawing Tool.

Dia is a GTK+ based diagram creation program for Linux, Unix and Windows released under the GPL license. Dia is inspired by the commercial Windows program 'Visio', though more geared towards informal diagrams for casual use. It is an editor for diagrams, graphs, charts etc. There is support for UML static structure diagrams (class diagrams), Entity-Relationship diagrams, network diagrams and much more. Diagrams can be exported to postscript and many other formats. To install DIA try >sudo apt-get install dia. for more information on Dia follow the links below : Link 1: https://help.ubuntu.com/community/Dia Link 2: http://live.gnome.org/Dia Link 3: http://www.gnome.org/projects/dia/ Dia for windows : Link 4: http://dia-installer.de/index_en.html Tutorials and documentation Dia Tutorial Dia tutorial written by Harry George Dia documentation A chapter about Dia from the book "The GNU/Linux Desktop" by Kayon Toga Dia/UML Tutorial A nic

Some useful commands

How to change the engine type of a table : >alter table reportsTransfer engine= innodb ; How to add foreign key to a table : >ALTER TABLE tbl_name ADD [CONSTRAINT symbol ] FOREIGN KEY [ index_name ] ( index_col_name , ...) REFERENCES tbl_name ( index_col_name , ...) [ON DELETE {RESTRICT | CASCADE | SET NULL | NO ACTION}] [ON UPDATE {RESTRICT | CASCADE | SET NULL | NO ACTION}] e.g >alter table reportsTransfer add foreign key reportsId (reportsInsertedId ) references reportsInserted (id) Note > Before adding a foreign key to table make sure both the tables ( Reference table and table having foreign key ) engine type = InnoDb . >InnoDB does not check foreign key constraints on those foreign key or referenced key values that contain a NULL column. >Currently, triggers are not activated by cascaded foreign key actions. Explain doesn't works with Delete and Update statement.