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

¡¶trÃüÁî ÓÅ»¯°æ¡· linuxÃüÁîÎå·ÖÖÓϵÁÐÖ®¶þÊ®Îå


ת×Ô:http://roclinux.cn/?p=1347
trÊÇtranslateµÄ¼òд£¬Ò༴·­Ò룬µ«ÊÇÒź¶µÄÊÇ£¬Ëü²»ÄÜ·­Òë¾ä×Ó£¬Ö»ÄÜ·­Òëµ¥¸ö×Ö·û¡£
1 trµÄ¹¤×÷Ô­ÀíÊÇʲô?
ÏȼÇסһµã£¬trÃüÁî²»½ÓÊÜÖ¸¶¨µÄÎļþ²ÎÊý£¬¶øÖ»ÊǶԱê×¼ÊäÈë½øÐз­Òë¡£ºÃÁË£¬¼ÇסÕâµãºó£¬ÎÒÃǼÌÐø¡£
trµÄÃüÁî¸ñʽÊÇtr SET1 SET2£¬·²ÊÇÔÚSET1ÖеÄ×Ö·û£¬¶¼»á±»Ì滻ΪSET2ÖÐÏàӦλÖÃÉϵÄ×Ö·û£¬¼òµ¥°É!
2 ¾Ù¸öÀý×Ó°É!
trµÄÀý×ÓÆäʵ¶¼´óͬСÒ죬¿´Ò»¸ö×î¼òµ¥µÄÀý×Ó£º
ÎÒÃÇÓÐÒ»¸ö°üº¬ÁËËĸöÈËÉí¸ßµÄÊý¾ÝÎļþ£¬Ãû×Ö½Ðheight.txt£¬ËüµÄÄÚÈÝÊÇÕâÑùµÄ£º
[rocrocket@rocrocket programming]$ cat height.txt
1.79 1.83
1.65 1.59
ÎÒÃÇÏë¸ãÒ»¸ö¶ñ×÷¾ç£¬½«ËùÓÐÈ˵ÄÉí¸ß´Ó1Ã×¼¶±ð¶¼Ìá¸ßµ½2Ã×¼¶±ð£¬ºÇºÇ£¬Ò»¸ötr¾Í¿ÉÒԸ㶨¡£
[rocrocket@rocrocket programming]$ tr 1 2 < height.txt
2.79 2.83
2.65 2.59
Ï£ÍûÄãûÓÐÍü¼Ç£¬trÖ»´¦Àí±ê×¼ÊäÈ룬ËùÒÔÎÒÃÇÐèÒª½«height.txtͨ¹ýÖض¨ÏòÖ¸µ½trµÄ±ê×¼ÊäÈë²Å¿ÉÒÔ¡£
3 ÎÒÃÇ¿ÉÒÔÓÃtrÀ´ÐÞ¸ÄÎļþÖеļä¸ô·ûô£¿
Good idea!
µ±Ê¹ÓÃcutµÄʱºò£¬Í¨³£»á±»¼ä¸ô·ûÎÊÌâËùÀ§ÈÅ£¬ÎÒÃÇÕâ¸öʱºò¿ÉÒÔ¿¼Âǵ½trÕâ¸öÃüÁî¡£
»¹ÊÇÒÔheight.txtÎļþΪÀý£¬ÆäÖеļä¸ô·ûÊÇ¿Õ¸ñ£¬ÎÒÃÇ°ÑËüÐÞ¸ÄΪÖƱí·û°É£¡
[rocrocket@rocrocket programming]$ tr ‘ ‘ ‘\11′ < height.txt
1.79    1.83
1.65    1.59
ÕâÀïÓÐÒ»¸öС֪ʶµã£¬ÏñÖƱí·û¡¢»»ÐзûÕâЩ×Ö·û²»ºÃ±íʾ£¬ÎÒÃÇ¿ÉÒÔ¿¼ÂÇʹÓÃASCIIµÄ°Ë½øÖÆÐÎʽÀ´±íʾ£¬ÖƱí·ûµÄ°Ë½øÖÆÐÎʽÊÇ11£¬»Ø³µÊÇ15£¬
»»ÐÐÊÇ12¡£¶øÔÚtrÃüÁîÖУ¬¿ÉÒÔʹÓÃ\nnnÐÎʽ±íʾ°Ë½øÖÆÐÎʽµÄ×Ö·û¡£Èç¹ûÄãʵÔڼDz»×¡ÕâЩ±àºÅ£¬ÄÇôÓÃ\t±íʾÖƱí·ûÄã×ܸÿÉÒÔ¼Çס°É£¡£¨\n´ú±í
ÐÂÐУ¬\r´ú±í»Ø³µ£©
ÕâÏ£¬ÄãÓ¦¸Ã¿ÉÒÔÀí½âÉÏÃæÄÇÌõÃüÁîµÄ×÷ÓÃÁË°É¡£Èç¹ûÄãÈÔÈ»»³ÒÉ£¬ÄÇô£¬¿´¿´ÏÂÃæÕâÌõÃüÁÄã¾Í¸ÃÐÄ·þ¿Ú·þÁË£º
[rocrocket@rocrocket programming]$ tr ‘ ‘ ‘\11′ < height.txt |sed -n l
1.79\t1.83$
1.65\t1.59$
¿´£¡¿Õ¸ñµÄµÄÈ·È·±»Ìæ»»³ÉÁËÖƱí·ûඣ¡
4 ʹÓÃtrÄÜ°ÑÎÄÕÂÖеÄСд¶¼×ª»»³É´óдô£¿
Õâ¸öÕýÊÇtrËùÉó¤µÄµØ·½¡£
¼ÓÈëÎÒÃÇÓµÓÐÒ»¸öÎļþ½Ð×öword.txt£¬ÀïÃæ°üº¬µÄÄÚÈÝÊÇAbcdE¡£
ÄÇô×î¼òµ¥µÄÌæ»»´óСдµÄ·½·¨ÊÇ£º
[rocrocket@rocrocket programming]$ cat word.txt
AbcdE
[rocrocket@rocrocket programming]$ tr ‘a-z’ ‘A-Z’ < wor


Ïà¹ØÎĵµ£º

LinuxÉ豸ģÐÍÖ®input×ÓϵͳÏê½â

Ò»£ºÇ°ÑÔ
×î½üÔÚÑо¿androidµÄsensor driver£¬Ö÷ÒªÊÇE-compass£¬ÆäÖÐÓõ½ÁËLinux input×Óϵͳ.ÔÚÍøÉÏÒ²¿´Á˺ܶàÕâ·½ÃæµÄ×ÊÁÏ£¬¸Ð¾õ»¹ÊÇÕâƪ·ÖÎöµÄ±È½ÏϸÖÂ͸³¹£¬Òò´ËתÔØÒ»ÏÂÒÔ±ã×Ô¼ºÑ§Ï°£¬Í¬Ê±ºÍ´ó¼Ò·ÖÏí£¡
£¨Õâƪ²©¿ÍÖ÷ÒªÊÇÒÔ¼üÅÌÇý¶¯ÎªÀýµÄ£¬²»¹ý½²½âµÄÊÇLinux Input Subsystem£¬¿ÉÒÔ×ÐϸµÄÑо¿Ò»Ï£¡£©
¼üÅÌÇý¶¯½«¼ì ......

(ת£©ÍêȫʹÓÃgnu/linux¹¤×÷

ת£©ÍêȫʹÓÃgnu/linux¹¤×÷
ÉÏһƪ / ÏÂһƪ  2008-08-17 17:59:59
²é¿´( 1752 ) / ÆÀÂÛ( 0 ) / ÆÀ·Ö( 0 / 0 )
ÍêÈ«ÓÃGNU/Linux¹¤×÷
Ç廪´óѧ Íõ珢
ÎÒÒѾ­°ëÄêûÓÐʹÓà Windows µÄ·½Ê½¹¤×÷ÁË¡£Linux ¸ßЧµÄÍê³ÉÁËÎÒËùÓеŤ×÷¡£
GNU/Linux ²»ÊÇÿ¸öÈ˶¼ÏëÓõġ£Èç¹ûÄãÖ»ÐèÒª´¦ÀíÒ»°ãµÄÊÂÎñ£¬´òÓÎÏ·£¬ÄÇà ......

Linuxʱ¼äÉèÖÃ

ʱÇøÉ趨:
Ö÷ÒªÎļþ
/etc/sysconfig/clock
Óñ±¾©Ê±¼äµÄÕýÈ·ÄÚÈÝÓ¦¸ÃÊÇ
TIMEZONE="Asia/Beijing"
DEFAULT_TIMEZONE="Asia/Beijing"
ͬʱȷ±£ /etc/localtimeÎļþÊÇ/usr/share/zoneinfo/Asia/BeijingµÄ¿½±´
±£³Ö¸üÐÂ:
ÔÚ/etc/crontabÖмÓÈëÒ»ÐÐ
10 5 * * * root /usr/sbin/ntpdate 221.139.48.11 && /sbin/ ......

linuxϵÄ/etc/security/limits.confÎļþ

limits.conf Îļþʵ¼ÊÊÇ Linux PAM£¨²åÈëʽÈÏ֤ģ¿é£¬Pluggable Authentication Modules£©ÖÐ pam_limits.so µÄÅäÖÃÎļþ£¬¶øÇÒÖ»Õë¶ÔÓÚµ¥¸ö»á»°¡£
limits.confµÄ¸ñʽÈçÏ£º
username|@groupname type resource limit
username|@groupname£ºÉèÖÃÐèÒª±»ÏÞÖƵÄÓû§Ãû£¬×éÃûÇ°Ãæ¼Ó@ºÍÓû§ÃûÇø±ð¡£Ò²¿ÉÒÔÓÃͨÅä·û*À´×öËùÓÐÓû§ ......

ÈçºÎ»ñµÃlinux ÃüÁîÔ´Âë°²×°°ü[ת]

Áí£ºÒªÊµÏÖijһЩlinux×Ô´øÃüÁîÏàͬµÄ¹¦ÄÜ£¬£¨±ÈÈ磺ҪʵÏÖÔÚlinuxϲéѯcpuµÄÕ¼ÓÃÂÊ£¬linuxµÄÃüÁîÊÇtop£©, ¿ÉÒԲο¼Ò»Ï¸ÃÃüÁî(top)µÄlinuxÔ´Â룬
ת×Ôhttp://hi.baidu.com/yanjinbin/blog/item/3d25ebdd29756fea76c6381f.html
# which reboot   <---whichÖ¸Áî»áÔÚ»·¾³±äÁ¿$PATHÉèÖõÄĿ¼Àï²éÕÒ·ûºÏÌõ¼þµÄ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ