linuxÉ豸Çý¶¯Ö®¿ØÖÆ̨Çý¶¯
¡¡Ò»:Ç°ÑÔ
¡¡¡¡ÎÒÃÇÔÚ֮ǰ·ÖÎö¹ýinput×ÓϵͳºÍttyÉ豸Çý¶¯¼Ü¹¹.½ñÌìÐèÒª½«Á½Õß½áºÏÆðÀ´.¿´¿´linuxÖеĿØÖÆ̨ÊÇÔõôÑùʵÏÖµÄ.
¡¡¡¡¶þ:¿ØÖÆ̨Çý¶¯µÄ³õʼ»¯
¡¡¡¡Ö®Ç°ÔÚ·ÖÎöttyÇý¶¯¼Ü¹¹µÄʱºòÔø·ÖÎöµ½.Ö÷É豸Ϊ4,´ÎÉ豸Ϊ0µÄÉ豸½Úµã,¼´/dev/tty0Ϊµ±Ç°µÄ¿ØÖÆÖÕ¶Ë.
¡¡¡¡ÓÐtty_init()ÖÐ,ÓÐÒÔÏ´úÂë¶Î:
¡¡¡¡static int __init tty_init(void)
¡¡¡¡{
¡¡¡¡……
¡¡¡¡……
¡¡¡¡#ifdef CONFIG_VT
¡¡¡¡cdev_init(&vc0_cdev, &console_fops);
¡¡¡¡if (cdev_add(&vc0_cdev, MKDEV(TTY_MAJOR, 0), 1) ||
¡¡¡¡register_chrdev_region(MKDEV(TTY_MAJOR, 0), 1, "/dev/vc/0") < 0)
¡¡¡¡panic("Couldn't register /dev/tty0 driver\n");
¡¡¡¡device_create(tty_class, NULL, MKDEV(TTY_MAJOR, 0), "tty0");
¡¡¡¡vty_init();
¡¡¡¡#endif
¡¡¡¡return 0;
¡¡¡¡}
¡¡¡¡CONFIG_VT:ÊÇÖ¸ÅäÖÃÐéÄâÖÕ¶Ë.¼´ÎÒÃÇËù˵µÄ¿ØÖÆ̨.ÔÚ´Ë¿ÉÒÔ¿´µ½TTY_MAJOR(4),0¶ÔÓ¦µÄÉ豸½Úµã²Ù×÷¼¯Îªconsole_fops.
¡¡¡¡¼ÌÐø¸ú½øvty_init()
¡¡¡¡int __init vty_init(void)
¡¡¡¡{
¡¡¡¡vcs_init();
¡¡¡¡console_driver = alloc_tty_driver(MAX_NR_CONSOLES);
¡¡¡¡if (!console_driver)
¡¡¡¡panic("Couldn't allocate console driver\n");
¡¡¡¡console_driver->owner = THIS_MODULE;
¡¡¡¡console_driver->name = "tty";
¡¡¡¡console_driver->name_base = 1;
¡¡¡¡console_driver->major = TTY_MAJOR;
¡¡¡¡console_driver->minor_start = 1;
¡¡¡¡console_driver->type = TTY_DRIVER_TYPE_CONSOLE;
¡¡¡¡console_driver->init_termios = tty_std_termios;
¡¡¡¡console_driver->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_RESET_TERMIOS;
¡¡¡¡tty_set_operations(console_driver, &con_ops);
¡¡¡¡if (tty_register_driver(console_driver))
¡¡¡¡panic("Couldn't register console driver\n");
¡¡¡¡kbd_init();
¡¡¡¡console_map_init();
¡¡¡¡#ifdef CONFIG_PROM_CONSOLE
¡¡¡¡prom_con_init();
¡¡¡¡#endif
¡¡¡¡#ifdef CONFIG_MDA_CONSOLE
¡¡¡¡mda_console_init();
¡¡¡¡#endif
¡¡¡¡return 0;
¡¡¡¡}
¡¡¡¡¾¹ýÎÒÃÇ֮ǰµÄttyÇý¶¯¼Ü¹¹·ÖÎö,Õâ¶Î´úÂë¿´ÆðÀ´¾Í±È½Ï¼òµ¥ÁË,Ëü¾ÍÊÇ×¢²áÁËÒ»¸öttyÇý¶¯.Õâ¸öÇý¶¯¶ÔÓ¦µÄ²Ù×÷¼¯ÊÇλÓÚcon_opsÀïÃæµÄ.
¡¡¡¡×Ðϸ¿´.ÔÚÖ®ºó»¹»áµ÷ÓÃkbd_init().¹ËÃû˼Òå,Õâ¸öÊÇÒ»¸öÓй
Ïà¹ØÎĵµ£º
ÌåÑéÒ»ÏÂlinuxϱàдºÍʹÓö¯Ì¬¿âÓ뾲̬¿â£¬·¶Àý£ºhelloworld³ÌÐò¡£
Ê×Ïȱàд¾²Ì¬¿â£º
hellos.h
#ifndef _HELLO_S_H
#define _HELLO_S_H
void prints(char *str);
#endif
hellos.c
#include "hellos.h"
#include <stdio.h>
void prints(char *str)
{
printf("print in sta ......
1.ÓÃoracleÓû§µÇ¼
Èç¹ûÒªÔٴΰ²×°£¬ ×îºÃÏÈ×öһЩ±¸·Ý¹¤×÷¡£
°üÀ¨Óû§µÄµÇ¼½Å±¾£¬Êý¾Ý¿â×Ô¶¯Æô¶¯¹Ø±ÕµÄ½Å±¾£¬ºÍListener×Ô¶¯Æô¶¯µÄ½Å±¾¡£
ÒªÊÇÓпÉÄÜÁ¬´´½¨Êý¾Ý¿âµÄ½Å±¾Ò²±£´æÏÂÀ´
2.ʹÓÃSQL*PLUSÍ£Ö¹Êý¾Ý¿â
[oracle@ora920 oracle]$ sqlplus /nolog
SQL> connect / as sysdba
SQL> shutdown [immediate]
......
¼Ç¼ÔÚlinuxÏ¿ª·¢Óöµ½µÄ¸÷ÖÖÎÊÌ⣬·½±ãÒÔºó²éÕÒ¡£
1.¹ØÓÚshellÖнű¾µÄÖ´Ðз½Ê½£ºÔÚµ±Ç°½Å±¾Ö´Ðл¹ÊÇÆô¶¯Ò»¸öеÄshell½ø³ÌÀ´Ö´Ðнű¾¡£
¼ÙÉ赱ǰĿ¼ÏÂÓнű¾script.sh¡£
Æô¶¯Ò»¸öеÄshell½ø³ÌÀ´Ö´ÐУº
ÕâÊÇshellÖÐĬÈϵÄÖ´Ðз½Ê½ÊÇÆô¶¯Ò»¸öеÄshell½ø³Ì£¨×Ó½ø³Ì£©À´Ö´Ðнű¾£¬¼´sh script.sh»òÕ߸³Ó ......
http://en.wikipedia.org/wiki/Loop_device
In Unix-like operating systems, a loop device, vnd (vnode disk), or lofi (loopback file interface) is a pseudo-device that makes a file accessible as a block device.
Ëùνloop deviceÖ¸µÄ¾ÍÊÇÄÃÎļþÀ´Ä£Äâ¿éÉ豸¡£
Albert WoodhullÓ"The Linux loop device can ......
Linux IPÉèÖÃ
ÐÞ¸Äip£º
±à¼Îļþ/etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0 //É豸Ãû³Æ£¬²»ÒªÐÞ¸Ä
BOOTPROTO=static //²»ÒªÐÞ¸Ä
BROADCAST=10.10.22.255 //¹ã²¥µØÖ·£¬Ò»°ãΪ±¾Íø¶ÎµÄ×îºóÒ»¸öIP
IPADDR=10.10.22.145 //ipµØÖ·
NETMASK=255.255.255.0 //×ÓÍøÑÚÂë
NETWORK=10.10.22.0 //Íø¶ÎµØÖ·
ONBOOT ......