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

LinuxÏ»ñµÃϵͳʱ¼äµÄCÓïÑÔµÄʵÏÖ·½·¨

 LinuxÏ»ñµÃϵͳʱ¼äµÄCÓïÑÔµÄʵÏÖ·½·¨
#include<time.h>  //CÓïÑÔµÄÍ·Îļþ
#include<stdio.h>  //CÓïÑÔµÄI/O
void main()
{
time_t now;    //ʵÀý»¯time_t½á¹¹
struct tm  *timenow;    //ʵÀý»¯tm½á¹¹Ö¸Õë
time(&now);
//timeº¯Êý¶ÁÈ¡ÏÖÔÚµÄʱ¼ä(¹ú¼Ê±ê׼ʱ¼ä·Ç±±¾©Ê±¼ä)£¬È»ºó´«Öµ¸ønow
timenow = localtime(&now);
//localtimeº¯Êý°Ñ´ÓtimeÈ¡µÃµÄʱ¼änow»»Ëã³ÉÄãµçÄÔÖеÄʱ¼ä(¾ÍÊÇÄãÉèÖõĵØÇø)
printf("Local time is %s\n",asctime(timenow));
//ÉϾäÖÐasctimeº¯Êý°Ñʱ¼äת»»³É×Ö·û£¬Í¨¹ýprintf()º¯ÊýÊä³ö
}
×¢ÊÍ£ºtime_tÊÇÒ»¸öÔÚtime.hÖж¨ÒåºÃµÄ½á¹¹Ìå¡£¶øtm½á¹¹ÌåµÄÔ­ÐÎÈçÏ£º
struct tm
{
  int tm_sec;//seconds 0-61
  int tm_min;//minutes 1-59
  int tm_hour;//hours 0-23
  int tm_mday;//day of the month 1-31
  int tm_mon;//months since jan 0-11
  int tm_year;//years from 1900
  int tm_wday;//days since Sunday, 0-6
  int tm_yday;//days since Jan 1, 0-365
  int tm_isdst;//Daylight Saving time indicator
};


Ïà¹ØÎĵµ£º

linuxϵͳÏÂÓÃshell½Å±¾´´½¨FTPÕʺÅ

ÒÔÏÂΪSHELL½Å±¾´´½¨Ò»¸ö±È½ÏÍêÕûµÄFTPÕʺÅ,°üÀ¨:
   1) ÐÂÔöFTPÕÊ»§ºÍĿ¼
   2) ÐÞ¸ÄFTPÕÊ»§ÃÜÂë
   3) ÔÚFTPÕÊ»§Ä¿Â¼ÏÂ,н¨Èý¸ö×ÓĿ¼,´æ·Å²»Í¬Êý¾Ý
   4) Ŀ¼ȨÏÞÖÃΪ¿É¶Áд
ʹÓÃ˵Ã÷:
   1) ´´½¨ÐÂshÎļþ(Èç:addFTPAcc.sh), ½«Ô´½Å±¾È«²¿¿½±´ÆäÖÐ
  ......

×Ô¼º¼ÇµÄһЩlinux³£Óö«Î÷1

²é¿´ËùÓл·¾³±äÁ¿  printenv
ÉèÖãºexport ±äÁ¿Ãû=±äÁ¿Öµ
ɾ³ý£ºunset ±äÁ¿Ãû
Èç¹ûÄãÏë²é¿´Ä³Ò»¸öÃû³ÆµÄ»·¾³±äÁ¿£¬ÃüÁîÊÇ£ºecho $»·¾³±äÁ¿Ãû£¬±ÈÈ磺
echo $ORACLE_HOME
cat ²é¿´ÃüÁî
source ÉúЧ
vi±à¼­Æ÷
ÏÈ°´esc£¬È»ºóÊäÈë :q! £¬´æÅÌÍ˳öÊäÈë :wq
2¡¢X·½Ê½:
¡¡¡¡(1). vi /etc/services # È·±£xdmcp¶Ë¿ ......

ÉîÈëdz³ö LinuxÉ豸Çý¶¯×èÈûÓë·Ç×èÈû (select poll)


×èÈû²Ù×÷ÊÇÖ¸£¬ÔÚÖ´ÐÐÉ豸²Ù×÷ʱ£¬Èô²»ÄÜ»ñµÃ×ÊÔ´£¬Ôò½ø³Ì¹ÒÆðÖ±µ½Âú×ã¿É²Ù×÷µÄÌõ¼þÔÙ½øÐвÙ×÷¡£·Ç×èÈû²Ù×÷µÄ½ø³ÌÔÚ²»ÄܽøÐÐÉ豸²Ù×÷ʱ£¬²¢²»¹ÒÆð¡£±»¹ÒÆðµÄ½ø³Ì½øÈësleep״̬£¬±»´Óµ÷¶ÈÆ÷µÄÔËÐжÓÁÐÒÆ×ߣ¬Ö±µ½µÈ´ýµÄÌõ¼þ±»Âú×ã¡£
ÔÚLinuxÇý¶¯³ÌÐòÖУ¬ÎÒÃÇ¿ÉÒÔʹÓõȴý¶ÓÁУ¨wait queue£©À´ÊµÏÖ×èÈû²Ù×÷¡£wait queueºÜÔ ......

1)Linux³ÌÐòÉè¼ÆÈëÃÅ

·     linux²Ù×÷ϵͳÏÂcÓïÑÔ±à³ÌÈëÃÅ
(Ò»)Ŀ¼½éÉÜ
1)Linux³ÌÐòÉè¼ÆÈëÃÅ--»ù´¡ÖªÊ¶
2)Linux³ÌÐòÉè¼ÆÈëÃÅ--½ø³Ì½éÉÜ
3)Linux³ÌÐòÉè¼ÆÈëÃÅ--Îļþ²Ù×÷
4)Linux³ÌÐòÉè¼ÆÈëÃÅ--ʱ¼ä¸ÅÄî
5)Linux³ÌÐòÉè¼ÆÈëÃÅ--ÐźŴ¦Àí
6)Linux³ÌÐòÉè¼ÆÈëÃÅ--ÏûÏ¢¹ÜÀí
7)Linux³ÌÐòÉè¼ÆÈëÃÅ--Ïß³Ì ......

5)Linux³ÌÐòÉè¼ÆÈëÃÅ

5)Linux³ÌÐòÉè¼ÆÈëÃÅ--ÐźŴ¦Àí
LinuxϵÄÐźÅʼþ
Ç°ÑÔ:ÕâÒ»ÕÂÎÒÃÇÌÖÂÛÒ»ÏÂLinuxϵÄÐźŴ¦Àíº¯Êý.
LinuxϵÄÐźŴ¦Àíº¯Êý:
ÐźŵIJúÉú
ÐźŵĴ¦Àí
ÆäËüÐźź¯Êý
Ò»¸öʵÀý
1¡£ÐźŵIJúÉú
LinuxϵÄÐźſÉÒÔÀà±ÈÓÚDOSϵÄINT»òÕßÊÇWindowsϵÄʼþ.ÔÚÓÐÒ»¸öÐźŷ¢Éúʱ
ºòÏàÐŵÄÐźžͻᷢË͸øÏàÓ¦µÄ½ø³ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ