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

ÔÚLinuxÏÂÐ޸Ļ·¾³±äÁ¿PATH

source file :
http://hi.baidu.com/neugraduzyq/blog/item/5602432f6a1a755a4ec22666.html
ÎÒÏëÔÚPATHϼÓÒ»¸ö/tools/binµÄ·¾¶ÓÃexport PATH=$PATH:/tools/binºóÓ¦¸ÃÊǼÓÉÏÈ¥ÁË£¬µ«ÊÇÓà echo $PATH »¹ÊÇÏÔʾµÄÔ­À´µÄ$PATH±äÁ¿µÄÖµ£¬¸Ð¾õÓÃexport PATH=$PATH:/tools/binÖ»ÊÇÔÚÔ­À´µÄ$PATH±äÁ¿ºó¼ÓÁËÒ»¸ö·¾¶µ½µ±Ç°µÄPATHÏ£¬µ«ÊÇûÓÐÕæÕýÐÞ¸Ä$PATHµÄÖµ£¬ÔõÑù¸Ä²ÅÄÜ ÔÚecho $PATH µÄʱºòÏÔʾµ±Ç°µÄPATHÖµÄØ£¿¾ÍÊÇ˵ÔõôÐ޸ıäÁ¿$PATH£¿ÎÒÒ²ÊÔÁËÐÞ¸Ä/etc/profile£¬µ«ÊÇÒ²ÊÇÖ»ÄܸÄPATHµÄÖµ£¬µ«¸Ä²»ÁË$PATH ±äÁ¿µÄÖµ¡£ÁíÍ⣬ÔõÑùÈ¡ÏûÒ»¸ö»·¾³±äÁ¿µÄÖ»¶ÁÊôÐÔ£¿
´ð£º ÔÚÄãµÄ
~/.bashrc ÀïÃæд
export PATH=$PATH:/tools/bin
×¢ÏúÒÔºóÖØеǽ¾Í¿ÉÒÔ¡£
Èç¹ûÄãÔÚijһ¸öÖÕ¶ËÀïÃæдÁËÉÏÃæÕâ¾ä»°
ÄÇÖ»ÊÇÔÚÕâ¸öÖÕ¶ËÀïÃæÐÞ¸ÄÁËPATH£¬¶ø¹Ø±ÕÁËÕâ¸öÖնˣ¬PATH»¹ÊÇÔ­À´µÄPATH.
ÄãÔÚ
/etc/profileÀïÃæÐÞ¸ÄPATHÊDz»ºÏÀíµÄ£¬ÒòΪÕâ¸ö±äÁ¿¿ÉÄܻᱻÆäËûµÄ½Å±¾¸øÐÞ¸ÄÁË¡£ËùÒÔ×îºÃÄãÔÚ
~/.bashrcÀïÃæд¡£
PATHµÄÖµÊÇһϵÁÐĿ¼£¬µ±ÄúÔËÐÐÒ»¸ö³ÌÐòʱ£¬LinuxÔÚÕâЩĿ¼Ï½øÐÐËÑÑ°¡£ÓÃÒÔÏÂÃüÁî¿ÉÒÔ¿´µ½PATHµÄÖµ¡£
$ echo $PATH
ÀýÈ磬ÔÚÖ÷»úÖУ¬Óû§yoginµÄPATHֵΪ£º
/opt/kde/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/home/yogin/bin
ÆäÖГ:”Ϊ·Ö¸ô·û¡£ËùÒÔ£¬ÉÏÃæµÄÒ»´®Ä¿Â¼¿ÉÒÔ¿´³ÉÊÇÈçϵÄĿ¼ÁÐ±í¡£
/opt/kde/bin
/usr/local/bin
/bin:/usr/bin
/usr/X11R6/bin
/home/yogin/bin
ͬÑù£¬Ò²ÊÇÖ÷»úÖУ¬Óû§rootµÄPATHֵΪ£º
/opt/kde/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin
ÒªÐÞ¸ÄËùÓÐÓû§µÄPATHÖµ£¬Äú¿ÉÒÔÒÔrootÉí·Ý±à¼­/etc/profileÎļþ£¬ÐÞ¸ÄÆäÖаüº¬“PATH=”µÄÒ»ÐС£
ÀýÈ磬Äú¿ÉÒÔʹÓÃpico±à¼­Æ÷´ò¿ª/etc/profileÎļþ¡£
$ pico -w /etc/profile
picoÊÇÒ»¸öÎı¾±à¼­Æ÷£¬¶ø-wÑ¡Ïî¹Ø±ÕÁ˳¤ÐлØÈƹ¦ÄÜ¡£
Ö»ÓÐÔÚÓû§ÖØÐÂ×¢²áºó£¬PATHµÄÐÂÖµ²Å»áÉúЧ¡£Èç¹ûÖ»ÊÇÒªÐÞ¸Äijһ¸öÓû§µÄPATHÖµ£¬¾ÍÓ¦¸Ã±à¼­¸ÃÓû§Ö÷Ŀ¼ÖеÄ.bash-profileÎļþ¡£
ÖйúÍø¹ÜÂÛ̳bbs.bitsCN.com
Èç¹ûÄúÏ뽫µ±Ç°Ä¿Â¼¼ÓÈëµ½PATHÖУ¬Ôò½«“.”¼ÓÈëPATHÖУ¬´ËʱPATHµÄÉ趨ÈçÏ£º
PATH="$PATH:/usr/X11R6/bin:."
export PATH
×¢Ò⣺ÔÚÐÞ¸ÄÁËPATHÖµ»òÈκλ·¾³±äÁ¿ºó£¬¶¼ÒªÓÃexport½«ÆäÊä³ö£¬ÐµÄPATHÖµ²ÅÄÜÉúЧ¡£


Ïà¹ØÎĵµ£º

linux쵀printf

      ÓÐʱ²»ÒªÒÔΪprintfÒ»¶¨ÄÜ´òÓ¡³öÊý¾ÝÀ´¡£ÓÐʱ£¬Äã²»ÔÚ³ÌÐòµÄÿ¸öµØ·½printfµÄµØ·½¶¼²»¼ÓÉÏ"\n”,³ÌÐò¸ù±¾¾Í²»´òÓ¡ÈκÎÊý¾Ý³öÀ´£¬ÐŲ»£¿£¡ÎҾ͵¹Ã¹µÄÓöµ½¸öÒ»´Î¡£Óöµ½ÕâЩºÜÍ·Ì۵ģ¬»¹ÒÔΪÊdzÌÐòÄĶù³ö´í¿©¡£Ô­À´ÕâÊÇÒòΪ£¬ËüÆäʵÓлº³åµÄ¹¦ÄÜ£¬Ö»ÓÐÔÚ“\n”£¬Ëü²Å½«»º³åÀïµÄ ......

Linux Platform Device and Driver

    
´Ó
Linux 2.6
ÆðÒýÈëÁËÒ»Ì×еÄÇý¶¯¹ÜÀíºÍ×¢²á»úÖÆ :Platform_device
ºÍ Platform_driver
¡£
     Linux
Öд󲿷ֵÄÉ豸Çý¶¯£¬¶¼¿ÉÒÔʹÓÃÕâÌ×»úÖÆ ,
É豸ÓÃ
Platform_device
±íʾ£¬Çý¶¯ÓÃ
Platform_driver
½øÐÐ×¢²á¡£

     Linu ......

LinuxÖն˽çÃ濪·¢_Ncurses¿â½éÉÜ

ÖÕ¶ËϵijÌÐò£º¼ò½à¡¢Æ¯ÁÁ¡¢¿ìËÙ¡¢ÇáÁ¿¡£
http://www.lslnet.com/linux/books/resource/curses1.html
http://www.lslnet.com/linux/books/resource/curses2.html
http://hi.baidu.com/%D0%ED%D0%F1%D6%F9/blog/item/f103b0cf214fbb0a93457ed8.html
¡¾Ê¹ÓÃsetlocaleº¯ÊýÉèÖÃlocale¡¿
ÔÚ³ÌÐòÖÐÉèÖÃlocaleÊÇΪÁ˸üºÃµÄÒÆÖ ......

ÔÚlinuxÏ »ñÈ¡£¬ÐÞ¸Ä×ÓÍøÑÚÂëNETMASKµÄÁ½¸öº¯Êý

//»ñÈ¡×ÓÍøÑÚÂëµÄº¯ÊýQString GetLocalNetMask()
{
int sock_netmask;
char netmask_addr[50];
struct ifreq ifr_mask;
struct sockaddr_in *net_mask;

sock_netmask = socket( AF_INET, SOCK_STREAM, 0 );
if( sock_netmask == -1)
{
perror("create socket failture...GetLocalNetMask\n");
......

Linux CÓïÑÔѧϰ±Ê¼Ç

1¡¢int    4×Ö½Ú
   long   8×Ö½Ú
   float  4×Ö½Ú
   double 8×Ö½Ú
   long double 16×Ö½Ú
2¡¢Ò»¸ö×Ö·û±äÁ¿Ö»ÄÜ´æ·ÅÒ»¸ö×Ö·û¡¢Ò»¸ö×Ö½Ú´æ·ÅÒ»¸ö×Ö½Ú
   char c;
   c = 'a';    c = '\034'   ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ