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 ÄÇÕÛÌÚÁ˺Ã
Ïà¹ØÎĵµ£º
Here is small script that does this. Debian or Ubuntu GNU/Linux does
not comes with any SYS V init script (located in /etc/init.d directory)
.
You create a script as follows and use it to stop or flush the iptables rules.
Please don't type rules at command prompt. Use the script to sp ......
2009-10-27
1£¬ÖØÆô reboot
2009-10-28
1,Íü¼ÇÁËrootÓû§ÃÜÂëµÄ½â¾ö°ï
Æô¶¯ºó°´esc½øÈëÐÞ¸´Ä£Ê½£¬Ñ¡ÔñÐÞ¸´£¬²¢Ñ¡Ôñ×îºóÒ»¸ö¡£root£¬½øÈ¥ºó£¬¸ü¸ÄÃÜÂ룺passwd root
È»ºó¸ù¾ÝÌáʾÊäÈëÁ½´ÎÃÜÂë¾ÍÐÐÁË¡£
2009-10-29
1,ls
ls -a ²é¿´ËùÓÐÎļþ
ls -l ²é¿´ÏêϸµÄÊôÐÔ
&nbs ......
ÍøÂç³ÌÐòºÍÆÕͨ³ÌÐò×î´óµÄÇø±ð¾ÍÊÇ,ÍøÂç³ÌÐòÊÇÓÉÁ½²¿·Ö×é³ÉµÄ--server/client.Ò»°ãÇé¿öÏÂ,ÊÇÏÈÔËÐÐserver¶ËÉϵijÌÐò,È»ºóµÈ´ýclient¶ËÉϵijÌÐòÔËÐв¢½¨Á¢Á¬½Ó,server¶ËÉϵijÌÐòÔÚÒ»¸ö¶Ë¿Ú¼àÌý,µÈ´ýclient¶Ë·¢À´µÄÇëÇó.
int socket(int domain,int type,int protocol)
domain:˵Ã÷ͨѶ³ÌÐòËùÔÚÖ÷»úËù²ÉÓõÄͨѶÐÒéÀ ......
º¯ÊýÔÐÍ£º
#include <pthread.h>
void pthread_cleanup_push(void (*rtn)(void *),void *arg);
º¯ÊýrtnÊÇÇåÀíº¯Êý£¬argÊǵ÷ÓòÎÊý
void pthread_cleanup_pop(int execute);
ÔÚÇ°Ãæ½²¹ýÏ̵߳ÄÖÕÖ¹·½Ê½£¬ÊÇÕý³£ÖÕÖ¹»¹ÊÇ·Ç ......
תÌùµØÖ·£ºhttp://www.linuxsir.org/main/?q=node/137
×ܽ᣺
zhy2111314
À´×Ô£º
LinuxSir.Org
ÕûÀí£º
±±ÄÏÄϱ±
ͻ񻣼
±¾ÎÄÊÇfind ÃüÁîµÄÏêϸ˵Ã÷£¬¿É¹óµÄÊÇÕë¶Ô²ÎÊý¾ÙÁ˺ܶàµÄʵÀý£¬´óÁ¿µÄÀýÖ¤£¬ÈóõѧÕ߸üΪÈÝÒ×Àí½â£»±¾ÎÄÊÇzhyflyÐÖÌùÔÚÂÛ̳ÖУ»ÎÒ¶Ô±¾ÎĽøÐÐÁËÔÙ´ÎÕûÀí£¬Îª·½±ã´ó¼ÒÔĶÁ£»
Ŀ¼
°æȨÉùÃ÷
Ç° ......