Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

linuxÔý¼Ç

 :::::::Linux ϵÄһЩ³£ÓÃÃüÁî
# uname -a # ²é¿´ÄÚºË/²Ù×÷ϵͳ/CPUÐÅÏ¢
# head -n 1 /etc/issue # ²é¿´²Ù×÷ϵͳ°æ±¾
# cat /proc/cpuinfo # ²é¿´CPUÐÅÏ¢
# hostname # ²é¿´¼ÆËã»úÃû
# lspci -tv # ÁгöËùÓÐPCIÉ豸
# lsusb -tv # ÁгöËùÓÐUSBÉ豸
# lsmod # Áгö¼ÓÔصÄÄÚºËÄ£¿é
# env # ²é¿´»·¾³±äÁ¿
×ÊÔ´
# free -m # ²é¿´ÄÚ´æʹÓÃÁ¿ºÍ½»»»ÇøʹÓÃÁ¿
# df -h # ²é¿´¸÷·ÖÇøʹÓÃÇé¿ö
# du -sh # ²é¿´Ö¸¶¨Ä¿Â¼µÄ´óС
# grep MemTotal /proc/meminfo # ²é¿´ÄÚ´æ×ÜÁ¿
# grep MemFree /proc/meminfo # ²é¿´¿ÕÏÐÄÚ´æÁ¿
# uptime # ²é¿´ÏµÍ³ÔËÐÐʱ¼ä¡¢Óû§Êý¡¢¸ºÔØ
# cat /proc/loadavg # ²é¿´ÏµÍ³¸ºÔØ
´ÅÅ̺ͷÖÇø
# mount | column -t # ²é¿´¹Ò½ÓµÄ·ÖÇø״̬
# fdisk -l # ²é¿´ËùÓзÖÇø
# swapon -s # ²é¿´ËùÓн»»»·ÖÇø
# hdparm -i /dev/hda # ²é¿´´ÅÅ̲ÎÊý(½öÊÊÓÃÓÚIDEÉ豸)
# dmesg | grep IDE # ²é¿´Æô¶¯Ê±IDEÉ豸¼ì²â×´¿ö
ÍøÂç
# ifconfig # ²é¿´ËùÓÐÍøÂç½Ó¿ÚµÄÊôÐÔ
# iptables -L # ²é¿´·À»ðǽÉèÖÃ
# route -n # ²é¿´Â·Óɱí
# netstat -lntp # ²é¿´ËùÓмàÌý¶Ë¿Ú
# netstat -antp # ²é¿´ËùÓÐÒѾ­½¨Á¢µÄÁ¬½Ó
# netstat -s # ²é¿´ÍøÂçͳ¼ÆÐÅÏ¢
½ø³Ì
# ps -ef # ²é¿´ËùÓнø³Ì
# top # ʵʱÏÔʾ½ø³Ì״̬
Óû§
# w # ²é¿´»î¶¯Óû§
# id # ²é¿´Ö¸¶¨Óû§ÐÅÏ¢
# last # ²é¿´Óû§µÇ¼ÈÕÖ¾
# cut -d: -f1 /etc/passwd # ²é¿´ÏµÍ³ËùÓÐÓû§
# cut -d: -f1 /etc/group # ²é¿´ÏµÍ³ËùÓÐ×é
# crontab -l # ²é¿´µ±Ç°Óû§µÄ¼Æ»®ÈÎÎñ
·þÎñ
# chkconfig --list # ÁгöËùÓÐϵͳ·þÎñ
# chkconfig --list | grep on # ÁгöËùÓÐÆô¶¯µÄϵͳ·þÎñ
³ÌÐò
# rpm -qa # ²é¿´ËùÓа²×°µÄÈí¼þ°ü
=======================================================
:::::::tar Óë crontab ½áºÏ¶¨Ê±±¸·Ý web Ŀ¼
Web ±¸·ÝûʲôºÃ°ì·¨£¬rsync ¸ãµÄÔκõÔκõ¾õµÃÒ²²»¿¿Æ×£¬»¹ÊÇѹËõÁËÒÔºó¶¨Ê±±¸·Ý°É¡£È»ºóÔÙ
Óà FTP ¶¨Ê±Íϵ½±¾µØÀ´¡£
˵¸É¾Í¸É
1¡¢×¼±¸½Å±¾ web_backup.sh
    #!/bin/bash
    DATE=`date "+%C%y%m%d%H%M%S"`
    tar -czvf /XXX/BBS_$DATE.tar.gz /XXX/bbs --exclude /XXX/cache
    tar -czvf /XXX/CENTER_$DATE.tar.gz /XXX/center --exclude /XXX/cache
    tar -czvf /XXX/SUN_$DATE.tar.gz /XXX/sun
ÔÚ DATE ÄÇÕÛÌÚÁ˺Ã


Ïà¹ØÎĵµ£º

ʵսLinux Bluetooth±à³Ì£¨ËÄ£© L2CAP²ã±à³Ì

£¨L2CAPЭÒé¼ò½é£¬L2CAPÔÚBlueZÖеÄʵÏÖÒÔ¼°L2CAP±à³Ì½Ó¿Ú£©
Ò»£ºL2CAPЭÒé¼ò½é£º
Logical Link Control and Adaptation Protocol(L2CAP)
Âß¼­Á¬½Ó¿ØÖƺÍÊÊÅäЭÒé (L2CAP) ΪÉϲãЭÒéÌṩÃæÏòÁ¬½ÓºÍÎÞÁ¬½ÓµÄÊý¾Ý·þÎñ£¬²¢Ìṩ¶àЭÒ鹦ÄܺͷָîÖØ×é²Ù×÷¡£L2CAP ³äÐíÉϲãЭÒéºÍÓ¦ÓÃÈí¼þ´«ÊäºÍ½ÓÊÕ×î´ó³¤¶ÈΪ 64K µÄ L2CAP Ê ......

ʵսLinux Bluetooth±à³Ì (Æß) SDPЭÒé

Service Discovery Protocol(SDP)ÌṩһÖÖÄÜÁ¦£¬ÈÃÓ¦ÓóÌÐòÓз½·¨·¢ÏÖÄÄÖÖ·þÎñ¿ÉÓÃÒÔ¼°ÕâÖÖ·þÎñµÄÌØÐÔ¡£
·þÎñ·¢ÏÖЭÒé(SDP»òBluetooth SDP)ÔÚÀ¶ÑÀЭÒéÕ»ÖжÔÀ¶ÑÀ»·¾³ÖеÄÓ¦ÓóÌÐòÓÐÌØÊâµÄº¬Ò⣬·¢ÏÖÄĸö·þÎñÊÇ¿ÉÓõĺÍÈ·¶¨ÕâЩ¿ÉÓ÷þÎñµÄÌØÕ÷¡£SDP¶¨ÒåÁËbluetooth client·¢ÏÖ¿ÉÓÃbluetooth server·þÎñºÍËüÃǵÄÌØÕ÷µÄ·½·¨¡£ ......

¹«¿ª ¡¶Unix/LinuxϵÄCurses¿â¿ª·¢Ö¸ÄÏ¡·È«ÊéÄÚÈÝ

 ¡¶Unix/LinuxϵÄCurses¿â¿ª·¢Ö¸ÄÏ¡·ÓÚ2003ÄêÓÉÇ廪³ö°æÉç³ö°æ£¬ºÏͬÔÚ2008Äê½áÊø¡£ÕâÊǹúÄÚΨһµÄÒ»±¾¹ØÓÚCurses¿â¿ª·¢Ö¸ÄϵÄͼÊé¡£±¾ÊéÎÞÒâÔٰ棬Òò´ËÌØÒ⹫¿ªÈ«ÊéÄÚÈÝ£¬ËùÓеÄÕ½ڻáÖ𽥷ųö¡£Ï£Íû¶Ô´ó¼ÒÓÐÓᣠ......

Linux²Ù×÷ϵͳϵĶàÏ̱߳à³ÌÏêϸ½âÎö£¨2£©


2¡¢Ï̵߳ÄÖÕÖ¹
    Èç¹û½ø³ÌÖÐÈκÎÒ»¸öÏß³ÌÖе÷ÓÃexit£¬_Exit,»òÕßÊÇ_exit£¬ÄÇôÕû¸ö½ø³Ì¾Í»áÖÕÖ¹£¬
    Óë´ËÀàËÆ£¬Èç¹ûÐźŵÄĬÈϵĶ¯×÷ÊÇÖÕÖ¹½ø³Ì£¬ÄÇô£¬°Ñ¸ÃÐźŷ¢Ë͵½Ï̻߳áÖÕÖ¹½ø³Ì¡£
    Ï̵߳ÄÕý³£Í˳öµÄ·½Ê½£º
       (1) Ïß³Ì ......

Linux²Ù×÷ϵͳϵĶàÏ̱߳à³ÌÏêϸ½âÎö£¨4£©


   º¯ÊýÔ­ÐÍ£º
   
#include <pthread.h>
void pthread_cleanup_push(void (*rtn)(void *),void *arg);
    º¯ÊýrtnÊÇÇåÀíº¯Êý£¬argÊǵ÷ÓòÎÊý
void pthread_cleanup_pop(int execute);
 
 
    ÔÚÇ°Ãæ½²¹ýÏ̵߳ÄÖÕÖ¹·½Ê½£¬ÊÇÕý³£ÖÕÖ¹»¹ÊÇ·Ç ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ