linux Òþʽµ÷Óà ×Ô¼ºÐ´µÄ¶¯Ì¬¿â
~/test
|
|
|------main.c
|------lib
| |
| |------StringLen.h
| |------Strlen.c
| |------Strnlen.c
----------------StringLen.h:
#ifndef _STRINGLEN_H__
#define _STRINGLEN_H__
int Strlen(char *pStr);
int StrNlen(char *pStr, unsigned long ulMaxLen);
#endif
-------------------------------------------------
---------------Strlen.c:
#include<stdio.h>
#include<assert.h>
#include "StringLen.h"
int Strlen(char *pStr)
{
unsigned long ulLength;
assert(NULL != pStr);
ulLength = 0;
while(*pStr++)
{
ulLength++;
}
return ulLength;
}
-------------------------------------------------
---------------Strnlen.c:
#include<stdio.h>
#include<assert.h>
#include "StringLen.h"
int StrNlen(char *pStr, unsigned long ulMaxLen)
{
unsigned long ulLength;
assert(NULL != pStr);
if(ulMaxLen <= 0)
{
printf("Wrong Max Length!\n");
return -1;
} &
Ïà¹ØÎĵµ£º
ÔÚÀàunix
²Ù×÷ϵͳ
ÖУ¬Çý¶¯
¼ÓÔØ
·½Ê½Ò»°ã·ÖΪ£º¶¯Ì¬¼ÓÔØºÍ¾²Ì¬¼ÓÔØ£¬ÏÂÃæ·Ö±ð¶ÔÆäÏêϸÂÛÊö¡£
Ò»¡¢¶¯Ì¬¼ÓÔØ
¶¯Ì¬¼ÓÔØÊǽ«Çý¶¯Ä£¿é¼ÓÔØµ½ÄÚºË
ÖУ¬¶ø²»ÄÜ·ÅÈë/lib/modules/Ï¡£
ÔÚ2.4ÄÚºËÖУ¬¼ÓÔØÇý¶¯ÃüÁî
Ϊ£ºinsmod ,ɾ³ýÄ£¿éΪ£ºrmmod£»
ÔÚ2 ......
½ñÌì×°ÁËÒ»ÌìµÄLinuxϵͳ£¬ÓëÆä˵°²×°»¹²»Èç˵ÊÇÏÂÔØÁËÒ»Ì죬ÏȺó×°ÁËfedora core 4£¬fedora core 6£¬×îºó×°fedora core 8ÖÕÓÚ¿ÉÒÔÓÃÁË£¬Ã¿¸ö¶¼ÊÇ3G¶à£¬ÒòΪÔÚѧУµÄ¹¤×÷ÊÒ£¬ËùÒÔÏÂÔØËÙ¶ÈÆ½¾ù¿ÉÒÔ´ïµ½1.9M²»µ½£¬Õâ¿ÉÊÇÏÞËٵ쬾ÍËãÕâÑùÎҵĵçÄÔÒ²ÒòΪÏÂÔØËÙ¶ÈÌ«¿ìËÀÁËN»ØÁË£¬¶¼ÊÇÇ¿ÖÆPowerµÄ£¬ÕæµÃ×°µÃÓеãÓôÃÆ°¡£¬×°FC4ÊÇÒ ......
LinuxϼӹÒÎļþϵͳµÄС½á
ѧϰ²Ù×÷ϵͳʱÎÒÃǶ¼Á˽⵽ÎļþϵͳÊDzÙ×÷ϵͳµÄÖØÒª×é³É²¿·ÖÖ®Ò»¡£ÎļþϵͳÓкܶàÖÖÀàÐÍ£¬±È
windowsµÄfat¡¢fat32£»LinuxµÄext¡¢ext2»òext3£»FreeBSDµÄufsµÈµÈ¡£ÔÚʹÓÃLinuxµÄ¹ý³Ì£¬Ò²³£³£Linux
²Ù×÷ϵͳʹÓÃÐéÄâÎļþϵͳVFS£¬Í¨¹ýVFS¿ÉÒÔÖ±½Ó´æÈ¡ÆäËüÒѱ»ÄÚºËÖ§³ÖµÄ¸÷ÖÖÎļþϵͳ£¬ÓÃÆðÀ´¾Í ......
linuxϼ¸ÖÖ·þÎñÆ÷µÄÅäÖÃʹÓÃÖ®Ò»£ºnfs tftp
°²×°nfsÐèÒªÔÚ·þÎñÆ÷¶Ë¹Ø±Õiptables·À»ðǽ£¬¹Ø±Õ·½·¨ÈçÏÂ
²é¿´·À»ðǽ״̬£º
/etc/init.d/iptables status
ÔÝʱ¹Ø±Õ·À»ðǽ£º
/etc/init.d/iptables stop
½ûÖ¹·À»ðǽÔÚϵͳÆô¶¯Ê±Æô¶¯
/sbin/chkconfig --level 2345 iptables off
ÖØÆôiptables:
/etc/init.d/iptabl ......
linux϶¨Ê±Ö´Ðмƻ®ÈÎÎñ
²é¿´/etc/crontabÎļþ
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/
# run-parts
01 * * * * root run-parts /etc/cron.hourly
02 4 * * * root run-parts /etc/cron.daily
22 4 * * 0 root run-parts /etc/cron.weekly
42 4 1 * * root run-parts /etc/cr ......