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

LinuxʱÖÓ»ù±¾¸ÅÄî

1¡¢ÏµÍ³Ê±ÖÓ(System Clock)ÓëʵʱʱÖÓ(Real Time Clock)
ʵʱʱÖÓÖ¸µÄÊÇÓ²¼þʱÖÓ£¬¶øϵͳʱÖÓÖ¸µÄÊÇÈí¼þʱÖÓ£¬´æÔÚÓÚLinuxϵͳ֮ÖС£µ±ÏµÍ³Æô¶¯Ê±£¬Linux»á´ÓÓ²¼þ¶Áȡʱ¼ä×öΪϵͳʱ¼ä£¬Ö®ºó±ãÒ»Ö±²ÉÓÃϵͳʱ¼ä¡£LinuxÃüÁîdate¿ÉÒÔÓÃÀ´ÉèÖÃϵͳʱÖÓ£¬¶øhwclock»òÕßclockÔòÓÃÀ´ÉèÖÃʵʱʱÖÓ£¬¼´Ó²¼þʱÖÓ¡£
2¡¢Ê±ÖÓƵÂÊ
µ¥Î»Ê±¼äÄÚ¾§ÌåÕñµ´Æ÷Ëù²úÉúµÄʱÖÓÂö³å¸öÊý£¬²ÉÓúêCLOCK_TICK_RATE±íʾ¡£
3¡¢Ê±ÖÓÖжÏƵÂÊ(HZ)
µ¥Î»Ê±¼äÄÚ²úÉúµÄʱÖÓÖжϴÎÊý£¬²ÉÓúêHZ±íʾ¡£
4¡¢Ê±ÖÓÖжÏÖÜÆÚ
²ÉÓÃtick±íʾ£¬µ¥Î»ÎªºÁÃë¡£Òò´Ë£¬Ê±ÖÓÖжÏÖÜÆÚ¿ÉÓÉÒÔϹ«Ê½ÇóµÃ
tick = 1000000/HZ
ΪÁËÔÚÉÏʽÓұ߲»Äܱ»Õû³ýʱʵÏÖËÄÉáÎåÈ룬Linux½«ÉÏÊöµÈʽÐÞÕýΪ
tick = (1000000+HZ/2)/2
5¡¢LATCH
Ò»¸öʱÖÖÖжÏÖÜÆÚÖÐËù°üº¬µÄʱÖÖÖÜÆÚ¡£Òò´Ë£¬LATCH¿ÉÓÉÒÔϹ«Ê½ÇóµÃ
LATCH = (1/HZ)/(1/CLOCK_TICK_RATE) = CLOCK_TICK_RATE/HZ
ΪÁËÔÚÉÏʽÓұ߲»Äܱ»Õû³ýʱʵÏÖËÄÉáÎåÈ룬Linux½«ÉÏÊöµÈʽÐÞÕýΪ
LATCH = (CLOCK_TICK_RATE+HZ/2)/HZ
6¡¢jiffies
¸ÃÈ«¾Ö±äÁ¿±íʾϵͳ×ÔÆô¶¯ÒÔÀ´Ëù¾­¹ýµÄàÖ´ð(tick)Êý£¬Êý¾Ý½á¹¹Îª32λÎÞ·ûºÅÕûÊý¡£¸Ä±äÁ¿Í¬³£ÔÚÄÚºËÖÐ×öΪʱ¼äʹÓá£
7¡¢xtime
¸ÃÈ«¾Ö±äÁ¿±íʾµ±Ç°ÏµÍ³Ê±¼ä¾àÀëUnix»ù׼ʱ¼ä1970-01-01 00:00:00µÄÏà¶ÔÃëÊýÖµºÍ²»×ãÒ»ÃëµÄ΢ÃëÊý£¬Êý¾Ý½á¹¹Îªstruct timeval¡£Í¨³£¶ÔxtimeµÄ¸üв»ÊǽôÆȵÄÈÎÎñ£¬Òò´Ë¸Ã¹¤×÷ͨ³£·¢ÉúµÄÔÚÖжϵĵײ¿¡£LinuxʹÓÃÁíÒ»¸öÈ«¾Ö±äÁ¿wall_jiffiesÀ´¼Ç¼ÉϴθüÐÂxtimeʱϵͳʱ¼äËù¶ÔÓ¦µÄàÖ´ðÊý¡£


Ïà¹ØÎĵµ£º

[ת]Linux: ubuntu½âѹÃüÁîÈ«ÀÀ


.tar
½â°ü£ºtar xvf FileName.tar
´ò°ü£ºtar cvf FileName.tar DirName
£¨×¢£ºtarÊÇ´ò°ü£¬²»ÊÇѹËõ£¡£©
---------------------------------------------
.gz
½âѹ1£ºgunzip FileName.gz
½âѹ2£ºgzip -d FileName.gz
ѹËõ£ºgzip FileName
.tar.gz ºÍ .tgz
½âѹ£ºtar zxvf FileName.tar.gz
ѹËõ£ºtar zcvf FileN ......

LinuxµÄ½âѹÃüÁî___±¸Íü

.tar
½â°ü£º tar xvf FileName.tar
´ò°ü£ºtar cvf FileName.tar DirName
£¨×¢£ºtarÊÇ´ò°ü£¬²»ÊÇѹËõ£¡£©
---------------------------------------------
.gz
½âѹ1£ºgunzip FileName.gz
½âѹ2£ºgzip -d FileName.gz
ѹËõ£ºgzip FileName
.tar.gz
½âѹ£ºtar zxvf FileName.tar.gz
ѹËõ£ºtar zcvf FileName.tar.g ......

Ò»¶Î»ùÓÚlinux V4LÊÓƵ²É¼¯ÉãÏñ³ÌÐòµÄÔ´Âë

/*****************************************************************************************************
linux_m4v.c
gcc -o linux_m4v linux_m4v.c -lc -lm -lxvidcore
*******************************************************************************************************/
#include <string.h>
# ......

linuxµÄchmodÃüÁîʹÓÃÏê½â

ʹÓ÷½Ê½ : chmod [-cfvR] [--help] [--version] mode file...
˵Ã÷ : Linux/Unix µÄµµ°¸´æȡȨÏÞ·ÖΪÈý¼¶ : µµ°¸ÓµÓÐÕß¡¢Èº×é¡¢ÆäËû¡£ÀûÓà chmod ¿ÉÒÔ½åÒÔ¿ØÖƵµ°¸ÈçºÎ±»ËûÈËËù´æÈ¡¡£
mode : ȨÏÞÉ趨×Ö´®£¬¸ñʽÈçÏ : [ugoa...][[+-=][rwxX]...][,...]£¬ÆäÖÐu ±íʾ¸Ãµµ°¸µÄÓµÓÐÕߣ¬g ±íʾÓë¸Ãµµ°¸µÄÓµÓÐÕßÊôÓÚͬһ¸öÈºÌ ......

linux϶àÏß³Ì Ö® pthread_detach(pthread_self())

ÕýʽʵϰһÖÜ£¬Óеã¸Ð´¥¡£±¾À´¾ÍûָÍûÄܳÉΪʲô¼¼Êõ´óÅ££¬ÓÃ×Ô¼ºµ÷Ù©µÄ»°À´Ëµ¾ÍÊÇ“»ì¿Ú·¹³Ô”¡£²»¹ýÀÏ´ó¶ÔmeµÄÆÚÍûÖµÄÇô¸ß£¬¾­Àí¹ÜµÃÕâôÑÏ£¬Ñ¹Á¦ÆĴ󡣶Ô×Ô¼ºÍ¦Ê§Íû£¬Ã»ÄÜ¿ªºÃÍ·£¬Óеã¶Ô²»ÆðÕâô³É¹¦µÄÀÏ´ó¡£»¹ºÃû׼±¸×öʲô´óÊ£¬Òª²»È»ÕâÐÔ¸ñµÃ·Ñ¶à´óÁ¦Æø²ÅÄÜÖØËÜ¡£¡£¡£
¶¼ÊDZƳöÀ´µÄ£¬±»¾­Àíѵºó£¬Ò»Ìì ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ