ÉîÈëÀí½âlinuxÄں˱ʼÇÁù£ºlinuxϵͳµ÷ÓÃ
Ò»°ãÇé¿öÏ£¬½ø³Ì²»ÄÜ´æȡϵͳÄں˵ģ¬Ö»ÓÐϵͳµ÷ÓÃÊÇÒ»¸öÀýÍ⣬ÔÚintel½á¹¹µÄ¼ÆËã»úÖУ¬ÊÇͨ¹ýÖжÏ0x80ʵÏÖµÄ
½ø³Ì¿ÉÒÔ¿ÉÒÔÌøתµ½ÄÚºËÖеÄλÖÃÊÇsystem_call¡£Ôڴ˼ì²éϵͳµ÷Óúţ¬Ëü¸æËßÄں˽ø³ÌÇëÇóºÎÖÖ·þÎñ£¬È»ºó²éÕÒϵͳµ÷Óñísys_call_table£¬ÕÒµ½Ï£Íûµ÷ÓõÄÄں˵ØÖ·º¯Êý£¬µ÷Óô˺¯Êý£¬È»ºó·µ»Ø¡£
1¡¢ ºê¶¨Òå(unistd.h)
_syscallN(type,name,x…)£¬NÊÇϵͳµ÷ÓÃËùÐè²ÎÊýÊýÄ¿£¬typeÊÇ·µ»ØÀàÐÍ,nameÊÇÃæÏòÓû§µÄϵͳµ÷Óú¯ÊýÃû,x…ÊDzÎÊý£¬¸öÊýΪN
È磺#define _syscall1(type,name,type1,arg1) \
type name(type1 arg1) \
{ \
long __res; \
__asm__ volatile ("push %%ebx ; movl %2,%%ebx ; int $0x80 ; pop %%ebx" \
: "=a" (__res) \
: "0" (__NR_##name),"ri" ((long)(arg1)) : "memory"); \
__syscall_return(type,__res); \
}
·ÖÎö£º
ouput£º _res 0% __NR##name “=a”±íʾ´æ·ÅÔÚeax¼Ä´æÆ÷
Ò²¾ÍÊDZíʾ°Ñ±äÁ¿_res´æ·ÅÔÚeaxÖУ¬“0”±íʾ°Ñ_NR##name¹ØÁªµ½0%¼´_res£®·µ»ØÖµÒ²´æ·ÅÔÚeaxÖУ®
#define _syscall2(type,name,type1,arg1,type2,arg2) \
type name(type1 arg1,type2 arg2) \
{ \
long __res; \
__asm__ volatile ("push %%ebx ; movl %2,%%ebx ; int $0x80 ; pop %%ebx" \
: "=a" (__res) \
: "0" (__NR_##name),"ri" ((long)(arg1)),"c" ((long)(arg2)) \
: "memory"); \
__syscall_return(type,__res); \
}
ͬÀí¿ÉÒÔÖªµÀarg1´æ·ÅÔÚeaxÖУ¬arg2´æ·ÅÔÚebxÖÐ
µ±ÎÒÃÇÔÚ³ÌÐòÖÐÓõ½ÏµÍ³µ÷ÓÃʱ£¬¶ÔÓÚlinuxÔ¤¶¨ÒåµÄϵͳµ÷Ó㬱àÒëÆ÷»áÔÚÔ¤´¦Àíʱ×Ô¶¯¼ÓÈëºê_syscallN()²¢½«ÆäÕ¹¿ª£¬¶ÔÓÚ×Ô¼ºÌí¼ÓµÄϵͳµ÷Óã¬ÐèÒªÔÚ³ÌÐòÖÐÏÔʾµØµ÷Óúê_syscallN£®
2 ϵͳµ÷ÓÃÈë¿Úº¯Êý
ÔÚ_syscallN()ÖÐÖ´ÐÐÁËint 0x80ºó£¬³ÌÐò½øÈëÄÚºË̬£¬ÎÒÃÇÔÚÏÝÚåÃźÍϵͳÃŵijõʼ»¯Àï×öÁËÈçÏÂÉèÖÃ
set_system_gate(SYSCALL_VECTOR,&system_call);
³ÌÐòÌøµ½system_call£¨entry.s£©´¦
ENTRY(system_call)
&nb
Ïà¹ØÎĵµ£º
PostgreSQL Linux
°²×°¼°Ê¹Ó㬼òÒ×ÊÖ²á
Ò»£¬ÅäÖ÷½·¨£º
1
£¬Ê×ÏÈÏÂÔØÈÎÒâ°æ±¾µÄPostgreSQL For Linux X86_64
wget http://downloads.enterprisedb.com/postgresql/postgresql-8.4.1-1-linux-x64.bin
2
£¬Îı¾Ä£Ê½°²×°
[root@imdba.cn ~]# ./postgresql-8.4.1-1-linux-x64.bin –mode text
&mda ......
LinuxÕÊ»§µÄÃÜÂë¼ÓÃܺó´æ·ÅÓÚ/etc/shadowÎļþÖС£¶ÔÓÚRedhat Enterprise°æ±¾£¬Ä¬ÈÏʹÓÃMD5Ëã·¨£¬Õâ¸öËã·¨ÒѾºÜ²»°²È«¡£ºÜ¶à¾µäµÄºÚ¿Í½Ì³Ì¶¼ÊǽÌÈËÄõ½shadowÎļþºó»ØÈ¥Æƽâ³örootµÄÃÜÂ룬Èç¹ûÄÜÓøüÄÑÆƽâµÄshaËã·¨¼ÓÃÜÃÜÂëÎÞÒÉ¿ÉÒÔÌá¸ß·þÎñÆ÷µÄ°²È«ÐÔ¡£ÒÔÏÂÄÚÈÝÊÇ×ÛºÏÁËhttp://www.cyberciti.biz/faq/rhel-centos-fedora ......
linux ¹ÒÔØÃüÁî : Mount
http://www.zhiweinet.com/jiaocheng/2009-02/2602.htm
mount¹ÒÔØÃüÁîʹÓ÷½·¨:
mount -t ÀàÐÍ -o ¹Ò½Ó·½Ê½ Ô´ Ä¿±ê
-t ÏêϸѡÏî
¡¡¡¡¹âÅÌ»ò¹âÅ̾µÏñ£ºiso9660
DOS fat16Îļþϵͳ£ºmsdos
¡¡¡¡Windows 9x fat32Îļþϵͳ£ºvfat
¡¡¡¡Windows NT ntfsÎļþϵͳ£ºn ......
ÏȼòÒª½éÉÜÏÂddµÄ²ÎÊý£¬ºó±ßͨ¹ý¼¸¸öʵÀý½éÉÜddµÄÓ¦Ó㬲ο¼ÁËÆäËûÍøÓѵÄ×ÊÁÏ£¬ÔÚ´ËÒ»
²¢¸Ðл£¬Ë®Æ½ÓÐÏÞÎÄÖÐÓÐʲô´íÎóÇë´ó¼ÒÖ¸Õý¡£
dd ÊÇ Linux/UNIX ϵÄÒ»¸ö·Ç³£ÓÐÓõÄÃüÁ×÷ÓÃÊÇÓÃÖ¸¶¨´óСµÄ¿é¿½±´Ò»¸öÎļþ£¬²¢ÔÚ¿½±´
µÄͬʱ½øÐÐÖ¸¶¨µÄת»»¡£
1. ÃüÁî¼ò½é
dd µÄÖ÷ҪѡÏ
Ö¸¶¨Êý×ֵĵط½ÈôÒÔÏÂÁÐ×Ö·û½áβ³ËÒÔÏ ......