LinuxÃüÁ
1. ×î³£ÓõÄÃüÁîÁбí
ÏÂÃæÁгöÊ®¸öÔÚʹÓÃlinux¹ý³ÌÖÐʹÓÃƵÂÊ×î¸ßµÄÃüÁî¡£ÕâÀïÖ»×÷¼òµ¥½éÉÜ£¬¾ßÌåÓ÷¨Çë²Î¿¼ºóÃæÄÚÈÝ¡£
cat£¬ÏÔʾÎļþÄÚÈÝ¡£
cd£¬¸Ä±äĿ¼·¾¶¡£
cp£¬¸´ÖÆÎļþ¡£
find£¬²éÕÒÎļþ¡£
grep£¬ËÑË÷¡¢¹ýÂËÐÅÏ¢¡£
ls£¬ÁгöĿ¼ÐÅÏ¢¡£
more£¬·ÖÒ³ÏÔʾ¡£
rm£¬É¾³ýÎļþ»òĿ¼¡£
vi£¬µ÷ÓÃviÎı¾±à¼Æ÷¡£
who£¬ÏÔʾµÇ¼Óû§ÐÅÏ¢¡£
2. chmod----¸Ä±äÒ»¸ö»ò¶à¸öÎļþµÄ´æȡģʽ(mode)
chmod [options] mode files
Ö»ÄÜÎļþÊôÖ÷»òÌØȨÓû§²ÅÄÜʹÓøù¦ÄÜÀ´¸Ä±äÎļþ´æȡģʽ¡£mode¿ÉÒÔÊÇÊý×ÖÐÎʽ»òÒÔwho opcode permissionÐÎʽ±íʾ¡£whoÊÇ¿ÉÑ¡µÄ£¬Ä¬ÈÏÊÇa(ËùÓÐÓû§)¡£Ö»ÄÜÑ¡ÔñÒ»¸öopcode(²Ù×÷Âë)¡£¿ÉÖ¸¶¨¶à¸ömode£¬ÒÔ¶ººÅ·Ö¿ª¡£
options£º
-c£¬--changes
Ö»Êä³ö±»¸Ä±äÎļþµÄÐÅÏ¢
-f£¬--silent£¬--quiet
µ±chmod²»ÄܸıäÎļþģʽʱ£¬²»Í¨ÖªÎļþµÄÓû§
--help
Êä³ö°ïÖúÐÅÏ¢¡£
-R£¬--recursive
¿ÉµÝ¹é±éÀú×ÓĿ¼£¬°ÑÐÞ¸ÄÓ¦µ½Ä¿Â¼ÏÂËùÓÐÎļþºÍ×ÓĿ¼
--reference=filename
²ÎÕÕfilenameµÄȨÏÞÀ´ÉèÖÃȨÏÞ
-v£¬--verbose
ÎÞÂÛÐÞ¸ÄÊÇ·ñ³É¹¦£¬Êä³öÿ¸öÎļþµÄÐÅÏ¢
--version
Êä³ö°æ±¾ÐÅÏ¢¡£
who
u
Óû§
g
×é
o
ÆäËü
a
ËùÓÐÓû§(ĬÈÏ)
opcode
+
Ôö¼ÓȨÏÞ
-
ɾ³ýȨÏÞ
=
ÖØзÖÅäȨÏÞ
permission
r
¶Á
w
д
x
Ö´ÐÐ
s
ÉèÖÃÓû§(»ò×é)µÄIDºÅ
t
ÉèÖÃÕ³×Åλ(sticky bit)£¬·ÀÖ¹Îļþ»òĿ¼±»·ÇÊôÖ÷ɾ³ý
u
Óû§µÄµ±Ç°È¨ÏÞ
g
×éµÄµ±Ç°È¨ÏÞ
o
ÆäËûÓû§µÄµ±Ç°È¨ÏÞ
×÷ΪѡÔñ£¬ÎÒÃǶàÊýÓÃÈýλ°Ë½øÖÆÊý×ÖµÄÐÎʽÀ´±íʾȨÏÞ£¬µÚһλָ¶¨ÊôÖ÷µÄȨÏÞ£¬µÚ¶þλָ¶¨×éȨÏÞ£¬µÚÈýλָ¶¨ÆäËûÓû§µÄȨÏÞ£¬Ã¿Î»Í¨¹ý4(¶Á)¡¢2(д)¡¢1(Ö´ÐÐ)ÈýÖÖÊýÖµµÄºÍÀ´È·¶¨È¨ÏÞ¡£Èç6(4+2)´ú±íÓжÁдȨ£¬7(4+2+1)ÓжÁ¡¢Ð´ºÍÖ´ÐеÄȨÏÞ¡£
»¹¿ÉÉèÖõÚËÄ룬ËüλÓÚÈýλȨÏÞÐòÁеÄÇ°Ã棬µÚËÄλÊý×ÖÈ¡ÖµÊÇ4£¬2£¬1£¬´ú±íÒâ˼ÈçÏ£º
4£¬Ö´ÐÐʱÉèÖÃÓû§ID£¬ÓÃÓÚÊÚȨ¸ø»ùÓÚÎļþÊôÖ÷µÄ½ø³Ì£¬¶ø²»ÊǸø´´½¨´Ë½ø³ÌµÄÓû§¡£
2£¬Ö´ÐÐʱÉèÖÃÓû§×éID£¬ÓÃÓÚÊÚȨ¸ø»ùÓÚÎļþËùÔÚ×éµÄ½ø³Ì£¬¶ø²»ÊÇ»ùÓÚ´´½¨´Ë½ø³ÌµÄÓû§¡£
1£¬ÉèÖÃÕ³×Åλ¡£
ʵÀý£º
$ chmod u+x file ¸øfileµÄÊôÖ÷Ôö¼ÓÖ´ÐÐȨÏÞ
$ chmod 751 file ¸øfileµÄÊôÖ÷·ÖÅä¶Á¡¢Ð´¡¢Ö´ÐÐ(7)µÄȨÏÞ£¬¸øfileµÄËùÔÚ×é·ÖÅä¶Á¡¢Ö´ÐÐ(5)µÄȨÏÞ£¬¸øÆäËûÓû§·ÖÅäÖ´ÐÐ(1)µÄȨÏÞ
$ chmod u=rwx,g=rx,o=x file ÉÏÀýµÄÁíÒ»ÖÖÐÎʽ
$ chmod =r
Ïà¹ØÎĵµ£º
°²×°mysql
sudo apt-get install mysql-servel-5.0 mysql-client-5.0
ÏÂÔØ°²×°¹ý³ÌÖУ¬»áÌáʾÊäÈërootÃÜÂë
°²×°CÓïÑÔ±à³Ì½Ó¿Ú£º
sudo apt-get install libmysqlclient15-dev
¸ü¶àapi ²é¿´£ºhttp://dev.mysql.com/doc/refman/5.0/en/c.html
Ïà¹ØmysqlÍ·ÎļþºÍ¿âÎļþ°²×°ÔÚ/usr/include/mysql/ºÍ/usr/lib/mysqlÄ¿ ......
¿ÉÒÔ½«Õâ¸ö½Å±¾·Å½øcrontab£¬ËûµÄÅäÖÆÎļþÔÚ /etc/crontabÖÐÿÌìÁ賿ִÐÐÒ»´Î£¬×Ô¶¯±¸·Ý Õâ¸ö½Å±¾Ã¿Ìì×î¶àÖ»Ö´ÐÐÒ»´Î£¬¶øÇÒÖ»±£Áô×î½üÎåÌìµÄ±¸·ÝÔÚ·þÎñÆ÷ÉÏ¡£
#!/bin/bash
#This is a ShellScript For Auto DB Backup
#Powered by aspbiz
#2004-09
#Setting
#ÉèÖÃÊý¾Ý¿âÃû£¬Êý¾Ý¿âµÇ¼Ãû£¬ÃÜÂ룬±¸·Ý·¾¶£¬ÈÕ־ ......
Æô¶¯mysql: /etc/rc.d/init.d/mysql start
ÐÞ¸ÄÃÜÂë: ¸ñʽ£ºmysqladmin -uÓû§Ãû -p¾ÉÃÜÂë password ÐÂÃÜÂë
ʹÓÃÃÜÂëµÇ¼: mysql -u root -p
ÏÔʾÊý¾Ý¿â: show databases;
Ñ¡ÔñÊý¾Ý¿â: use Êý¾Ý¿âÃû;
ÏÔʾ±í: show tables;
ÏÔʾ±í½á¹¹: descibe ±íÃû;
Ô¶³ÌµÇ¼mysqlÐèÒª¿ªÆôÈ ......
(AIXÃüÁî)iostatÃüÁîÖ÷Ҫͨ¹ý¹Û²ìÎïÀí´ÅÅ̵ĻîԾʱ¼äÒÔ¼°ËûÃǵÄƽ¾ù´«ÊäËٶȣ¬¼à¿ØϵͳÊäÈë/Êä³öÉ豸¸ºÔØ.
iostat [¼ä¸ôʱ¼ä] [´òÓ¡´ÎÊý]
exp: iostat 5 2
psÃüÁîÊÇUNIXϵͳÖÐ×î³£¼ûµÄÃüÁËüÖ÷ÒªÏÔʾϵͳÖйØÓÚ½ø³ÌµÄͳ¼ÆºÍ״̬ÐÅÏ¢£¬Èç½ø³ÌID£¬I/OÐÐΪÒÔ¼°CPUÀûÓÃÂʵÈ.
ÏÔʾ10¸öÏûºÄCPU×î¶àµÄ½ø³Ì£º
ps aux |sort ......
ת×Ô£ºÍäÇúÆÀÂÛ£ºtektalk.cn homepage µÚÒ»²¿·Ö MIPS CPU Ìåϵ½á¹¹¸ÅÊö 1. MIPS¸ÅÊö ±¾ÎĽéÉÜMIPSÌåϵ½á¹¹£¬×ÅÖØÓÚÆä¼Ä´æÆ÷Ô¼¶¨£¬MMU¼°´æ´¢¹ÜÀí£¬Òì³£ºÍÖжϴ¦ÀíµÈµÈ¡£ ͨ¹ý±¾ÎÄ£¬Ï£ÍûÄÜÌṩһ¸ö»ù±¾µÄÂÖÀª¸ÅÄî¸ø¶ÔMIPS CPU¼°Ö®ÉϲÙ×÷ϵͳÓÐÐËȤµÄ¶ÁÕߣ¬²¢ÄÜ¿ªÊ¼ÔĶÁ¸üÏêϸµÄ¹éÔ¼(SPECIFICATION)×ÊÁÏ¡£ (ÔÚÏßPDFÎļþÏ ......