Archives

You are currently viewing archive for 03 September 2007
Category: Linux tips
Posted by: hajime osako
Oreilly Screen
screenのススメ
SCREEN

"C-a c" : create a new screen
"C-a C-\" : quite screen

# screen -list
# screen -S [name]
Category: Linux tips
Posted by: hajime osako
UNIX Tutorial Five
$ sleep 1000           (type any command to be background)
Ctrl + z, then type bg
$ jobs                 (to check current jobs)
$ fg %1
Processes - Linux Shell Commands
cc hugepgm.c > outlist &
Note: It's a good idea to redirect the output of background tasks to a file, as shown here, since the background task still shares the console with foreground tasks. If you don't, the background task will splash any output it might produce all over your screen while you're editing a file or typing another command.

If you start a long-running task and forget to add the ampersand, you can still swap that task into the background. Instead of pressing ctrl-C (to terminate the foreground task) and then restarting it in the background, just press ctrl-Z after the command starts, type bg, and press enter. You'll get your prompt back and be able to continue with other work. Use the fg command to bring a background task to the foreground.
Category: Linux tips
Posted by: hajime osako
The /bin/false is a special shell which returns a nonzero error code for blocking access by a user.
The /etc/nologin is used to block logins for accounts and echo a message.

The /etc/profile is the global configuration file that affects all users' environment if they use the bash shell. The user's ~/.bash_profile, if et exists, is the next script that's sourced. This script calls, or sources, ~/.bashrc.

Multiple Command Operators

The semicolon causes all listed commands to be executed independently.
make modules ; echo DO MAKE MODULES_INSTALL NEXT

The double ampersand causes the second command to be excuted if the first command has an exit status of 0 (success).

The double pipe is opposite of the double ampersand.
Category: Web dev
Posted by: hajime osako
Category: Study
Posted by: hajime osako
To see which storage engines your server supports, use the SHOW ENGINES;.

CREATE TABLE [db name].[table name] (...) ENGINE = InnoDB;
ALTER TABLE [db name].[table name] ENGINE = MyISAM;

The build-in default value of the storage_engine system variable is MyISAM.
The default storage engine can be specified at server startup with the --default-storage-engine option.
Or
SET GLOBAL storage_engine = [engine name]; if you have the SUPER privilege.
SET SESSION storage_engine = [engine name];
SET storage_engine = [engine name];