Archives

You are currently viewing archive for 10 September 2007
Category: Linux tips
Posted by: hajime osako
% printenv | less

UNIX Tutorial Eight
    * OSTYPE (OS type)
    * USER (your login name)
    * HOME (the path name of your home directory)
    * HOST (the name of the computer you are using)
    * ARCH (the architecture of the computers processor)
    * DISPLAY (the name of the computer screen to display X windows)
    * PRINTER (the default printer to send print jobs)
    * PATH (the directories the shell should search to find a command)
Category: Linux tips
Posted by: hajime osako
UNIX Tutorial Four
$ apropos keyword
Category: Linux tips
Posted by: hajime osako
Arnolds wor(l)ds Eclipse problems solved (finally)
Install the SUN Java (at least 5.0)
$ sudo update-java-alternatives -s java-1.x.x-sun
$ eclipse -vm /usr/lib/jvm/java-1.x.x-sun/jre/bin/java
* you might need to use sudo to create some files at the first time.
Category: Study
Posted by: hajime osako
Add, delete and modify a column:

ALTER TABLE my_table ADD new_date_column DATE NOT NULL [FIRST | AFTER existing_column];
ALTER TABLE my_table DROP dropping_column;
ALTER TABLE my_table MODIFY modifying_column DATETIME NOT NULL;
ALTER TABLE my_table CHANGE original_column new_name CHAR(40) NOT NULL;
ALTER TABLE my_table CHANGE original_column new_name CHAR(40) NOT NULL AUTO_INCREMENT, ADD PRIMARY KEY(new_name);

* You should specify the all column attributes when you use MODIFY. If you want to disallow NULL in the column, the column definition provided for MODIFY must include the NOT NULL attribute.


Renaming a table:

ALTER TABLE my_table RENAME TO my_renamed_table;
RENAME TABLE my_table1 TO tmp, my_table2 TO my_table1, tmp TO my_table2;

* For TEMPORARY tables, RENAME TABLE does not work.

09/10: Linux > SSH

Category: Linux tips
Posted by: hajime osako
ITmedia エンタープライズ : Linux Tips「SSHのログイン制限を確認しよう」
PermitRootLogin no
PermitEmptyPasswords no
PasswordAuthentication no
AllowUsers hoge
CheckHostIP yes