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

linux sort ÃüÁîÏê½â

     
sortÃüÁîµÄ¹¦ÄÜÊǶÔÎļþÖеĸ÷ÐнøÐÐÅÅÐò¡£sortÃüÁîÓÐÐí¶à·Ç³£ÊµÓõÄÑ¡ÏÕâЩѡÏî×î³õÊÇÓÃÀ´¶ÔÊý¾Ý¿â¸ñʽµÄÎļþÄÚÈݽøÐи÷ÖÖÅÅÐò²Ù×÷µÄ¡£Êµ¼Ê
ÉÏ£¬sortÃüÁî¿ÉÒÔ±»ÈÏΪÊÇÒ»¸ö·Ç³£Ç¿´óµÄÊý¾Ý¹ÜÀí¹¤¾ß£¬ÓÃÀ´¹ÜÀíÄÚÈÝÀàËÆÊý¾Ý¿â¼Ç¼µÄÎļþ¡£
SortÃüÁÖðÐжÔÎļþÖеÄÄÚÈݽøÐÐÅÅÐò£¬Èç¹ûÁ½ÐеÄÊ××Ö·ûÏàͬ£¬¸ÃÃüÁ¼ÌÐø±È½ÏÕâÁ½ÐеÄÏÂÒ»×Ö·û£¬Èç¹û»¹Ïàͬ£¬½«¼ÌÐø½øÐбȽϡ£
Óï·¨£º
sort £ÛÑ¡Ïî£Ý Îļþ
˵Ã÷£ºsortÃüÁî¶ÔÖ¸¶¨ÎļþÖÐËùÓеÄÐнøÐÐÅÅÐò£¬²¢½«½á¹ûÏÔʾÔÚ±ê×¼Êä³öÉÏ¡£Èç²»Ö¸¶¨ÊäÈëÎļþ»òʹÓÃ"- "£¬Ôò±íʾÅÅÐòÄÚÈÝÀ´×Ô±ê×¼ÊäÈë¡£
sortÅÅÐòÊǸù¾Ý´ÓÊäÈëÐгéÈ¡µÄÒ»¸ö»ò¶à¸ö¹Ø¼ü×Ö½øÐбȽÏÀ´Íê³ÉµÄ¡£ÅÅÐò¹Ø¼ü×Ö¶¨ÒåÁËÓÃÀ´ÅÅÐòµÄ×îСµÄ×Ö·ûÐòÁС£È±Ê¡Çé¿öÏÂÒÔÕûÐÐΪ¹Ø¼ü×Ö°´ASCII
×Ö·û˳Ðò½øÐÐÅÅÐò¡£
¸Ä±äȱʡÉèÖõÄÑ¡ÏîÖ÷ÒªÓУº
- m Èô¸ø¶¨ÎļþÒÑÅźÃÐò£¬ºÏ²¢Îļþ¡£
- c ¼ì²é¸ø¶¨ÎļþÊÇ·ñÒÑÅźÃÐò£¬Èç¹ûËüÃÇûÓж¼ÅźÃÐò£¬Ôò´òÓ¡Ò»¸ö³ö´íÐÅÏ¢£¬²¢ÒÔ״ֵ̬1Í˳ö¡£
- u ¶ÔÅÅÐòºóÈÏΪÏàͬµÄÐÐÖ»ÁôÆäÖÐÒ»ÐС£
- o Êä³öÎļþ
½«ÅÅÐòÊä³öдµ½Êä³öÎļþÖжø²»ÊDZê×¼Êä³ö£¬Èç¹ûÊä³öÎļþÊÇÊäÈëÎļþÖ®Ò»£¬sortÏȽ«¸ÃÎļþµÄÄÚÈÝдÈëÒ»¸öÁÙʱÎļþ£¬È»ºóÔÙÅÅÐòºÍдÊä³ö½á¹û¡£
¸Ä±äȱʡÅÅÐò¹æÔòµÄÑ¡ÏîÖ÷ÒªÓУº
- d °´×Öµä˳ÐòÅÅÐò£¬±È½Ïʱ½ö×Öĸ¡¢Êý×Ö¡¢¿Õ¸ñºÍÖƱí·ûÓÐÒâÒå¡£
- f ½«Ð¡Ð´×ÖĸÓë´óд×ÖĸͬµÈ¶Ô´ý¡£
- I ºöÂÔ·Ç´òÓ¡×Ö·û¡£
- M ×÷ΪÔ·ݱȽϣº"JAN"<"FEB"  
- r °´ÄæÐòÊä³öÅÅÐò½á¹û¡£
£«posl - pos2
Ö¸¶¨Ò»¸ö»ò¼¸¸ö×Ö¶Î×÷ΪÅÅÐò¹Ø¼ü×Ö£¬×Ö¶ÎλÖôÓposl¿ªÊ¼£¬µ½pos2Ϊֹ£¨°üÀ¨posl£¬²»°üÀ¨pos2£©¡£Èç²»Ö¸¶¨pos2£¬Ôò¹Ø¼ü×ÖΪ´Óposl
µ½ÐÐβ¡£×ֶκÍ×Ö·ûµÄλÖôÓ0¿ªÊ¼¡£
- b ÔÚÿÐÐÖÐÑ°ÕÒÅÅÐò¹Ø¼ü×ÖʱºöÂÔÇ°µ¼µÄ¿Õ°×£¨¿Õ¸ñºÍÖƱí·û£©¡£
- t separator Ö¸¶¨×Ö·ûseparator×÷Ϊ×ֶηָô·û¡£
ÏÂÃæͨ¹ý¼¸¸öÀý×ÓÀ´½²ÊösortµÄʹÓá£
ÓÃsortÃüÁî¶ÔtextÎļþÖи÷ÐÐÅÅÐòºóÊä³öÆä½á¹û¡£Çë×¢Ò⣬ÔÚÔ­ÎļþµÄµÚ¶þ¡¢ÈýÐÐÉϵĵÚÒ»¸öµ¥´ÊÍêÈ«Ïàͬ£¬¸ÃÃüÁ´ÓËüÃǵĵڶþ¸öµ¥´Ê
vegetablesÓëfruitµÄÊ××Ö·û´¦¼ÌÐø½øÐбȽϡ£
$ cat text
vegetable soup
fresh vegetables
fresh fruit
lowfat milk
$ sort text
fresh fruit
fresh vegetables
lowfat milk
vegetable soup
Óû§¿ÉÒÔ±£´æÅÅÐòºóµÄÎļþÄÚÈÝ£¬»ò°ÑÅÅÐòºóµÄÎļþÄÚÈÝÊä


Ïà¹ØÎĵµ£º

¹È¸èAndroid±»LinuxÄں˳ýÃû






<!--
@page { margin: 2cm }
P { margin-bottom: 0.21cm }
-->
       ¹È¸èºÜÅ£Æø£¬¸ù±¾²»Àí»á
Linux
Äں˿ª·¢ÍŶӣ¬½á¹û±»³ýÃû¡£¿É±¯Ò²£¡
 
    2
ÔÂ
3
ÈÕ£¬
Linux
Äں˿ª·¢Õß
Greg
Kroah-Hartman
½«
Android
µÄÇý¶¯³ÌÐò´ ......

linux 0.11 Îļþϵͳ£¨¶þ£©

³¬¼¶¿éÃèÊöÁËÕû¸öÎļþϵͳµÄÐÅÏ¢£¬¶øÎļþ×÷Ϊ´æ´¢µÄ¶ÔÏó£¬ËüµÄÐÅÏ¢ÊÇÓÐinode½ÚµãÀ´ÃèÊöµÄ¡£i½ÚµãλͼÃèÊöÁËinodeµÄʹÓÃÇé¿ö¡£
struct m_inode{
        unsigned short i_mode; //ÎļþÀàÐÍ
        unsigned short i_uid;//ÎļþËÞÖ÷
......

Linux findÃüÁîÏê½â


ÓÉÓÚfind¾ßÓÐÇ¿´óµÄ¹¦ÄÜ£¬ËùÒÔËüµÄÑ¡ÏîÒ²ºÜ¶à£¬ÆäÖд󲿷ÖÑ¡ÏֵµÃÎÒÃÇ»¨Ê±¼äÀ´Á˽âһϡ£¼´Ê¹ÏµÍ³Öк¬ÓÐÍøÂçÎļþϵͳ(
NFS)£¬findÃüÁîÔÚ¸ÃÎļþϵͳÖÐͬÑùÓÐЧ£¬Ö»Äã¾ßÓÐÏàÓ¦µÄȨÏÞ¡£ÔÚÔËÐÐÒ»¸ö·Ç³£ÏûºÄ×ÊÔ´µÄ ...
ÓÉÓÚfind¾ßÓÐÇ¿´óµÄ¹¦ÄÜ£¬ËùÒÔËüµÄÑ¡ÏîÒ²ºÜ¶à£¬ÆäÖд󲿷ÖÑ¡ÏֵµÃÎÒÃÇ»¨Ê±¼äÀ´Á˽âһϡ£¼´Ê¹ÏµÍ³ ......

linux dfisk, du,df(´ÅÅÌ¿Õ¼äÐÅÏ¢)ÃüÁîÏê½â


dfÃüÁîÏêϸÓ÷¨
 
a£ºÏÔʾȫ²¿µÄµµ°¸ÏµÍ³ºÍ¸÷·Ö¸îÇøµÄ´ÅÅÌʹÓÃÇéÐÎ
i£ºÏÔʾi -nodesµÄʹÓÃÁ¿
k£º´óСÓÃkÀ´±íʾ (ĬÈÏÖµ)
t£ºÏÔʾijһ¸öµµ°¸ÏµÍ³µÄËùÓзָîÇø´ÅÅÌʹÓÃÁ¿
x£ºÏÔʾ²»ÊÇijһ¸öµµ°¸ÏµÍ³µÄËùÓзָîÇø´ÅÅÌʹÓÃÁ¿
T£ºÏÔʾÿ¸ö·Ö¸îÇøËùÊôµÄµµ°¸ÏµÍ³Ãû³Æ
³£ÓÃÃüÁdf -hi
 
²Ù×÷Ïê½â
&n ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ