锘??xml version="1.0" encoding="utf-8" standalone="yes"?>C++鍗氬-Prayerhttp://www.2676208.com/prayer/鍦ㄤ竴鑸腑瀵绘眰鍗撹秺zh-cnSun, 25 Aug 2019 08:49:48 GMTSun, 25 Aug 2019 08:49:48 GMT60DB2 缂撳啿姹犺皟浼楤ufferpoolshttp://www.2676208.com/prayer/archive/2019/06/24/216446.htmlPrayerPrayerMon, 24 Jun 2019 02:09:00 GMThttp://www.2676208.com/prayer/archive/2019/06/24/216446.htmlhttp://www.2676208.com/prayer/comments/216446.htmlhttp://www.2676208.com/prayer/archive/2019/06/24/216446.html#Feedback0http://www.2676208.com/prayer/comments/commentRss/216446.htmlhttp://www.2676208.com/prayer/services/trackbacks/216446.htmlhttps://blog.csdn.net/liujinwei2005/article/details/8547190

DB2 缂撳啿姹犺皟浼楤ufferpools


鑳屾櫙鐭ヨ瘑
缂撳啿姹犳槸鍐呭瓨?#33105;?#27537;?#31476;鍧楀瓨鍌ㄥ尯鍩燂紝鐢ㄤ簬涓存椂璇诲叆鍜屾?#23384;敼鏁版嵁搴?/span>椤碉紙鍖呭惈琛?#29723;屾?#26667;储寮?#26916;?#38171;夈?#32514;撳啿姹犵殑鐢?#38315;旀槸涓轰簡鎻愰珮鏁版嵁搴撶郴缁熺殑鎬?#38003;?#37510;備粠鍐呭瓨璁块棶鏁版嵁瑕佹瘮?#31904;纾?#37929;?#29825;块棶鏁版嵁?#25577;寰楀銆傚?#29363;锛屾?#29256;嵁搴?a target="_blank" style="box-sizing: border-box; outline: 0px; margin: 0px; padding: 0px; color: #4ea1db; cursor: pointer; font-family: 'Microsoft YaHei', 'SF Pro Display', Roboto, Noto, Arial, 'PingFang SC', sans-serif; word-wrap: break-word;">绠$悊鍣ㄩ渶瑕佷粠纾?#37929;?#29831;诲彇鎴?#37712;欏叆纾?#37929;樼殑娆?#37825;拌秺?#30383;锛屾?#38003;?#28751;辫秺濂?#37510;?#28725;逛竴涓?#37812;栧涓?#32514;撳啿姹犺繘琛岄厤缃箣鎵浠ユ槸?#30367;浼樼殑?#28214;閲?#29781;佹?#24402;潰锛屾槸?#27932;涓?#26473;炴帴鑷?#37825;版嵁搴撶殑搴?#37922;?#32459;?#25652;忕殑澶?#28598;?#37825;?#37825;版嵁?#32025;涓?#37718;?#37815;?#28598;?#28725;硅薄鍜岄暱瀛楁鏁版嵁锛夋搷浣滈兘鍦?#32514;撳啿姹犱腑?#32344;琛?#37510;?/div>
缂虹?#20345;儏鍐?#28051;嬶紝搴?#37922;?#32459;?#25652;?#28003;?#37922;?#32514;撳啿姹?IBMDEFAULTBP?#32029;?#30048;?#27128;鍦?#37714;涘缓鏁版嵁搴撴椂鍒涘?#34425;殑銆傚綋 SYSCAT.BUFFERPOOLS 鐩綍琛ㄤ腑璇?#32514;撳啿姹犵殑 NPAGES 鍊?#28051;?-1 ?#26882;?#32029;DB2 鏁版嵁搴撻厤缃弬鏁?BUFFPAGE 鎺?#37714;?#37931;缂撳啿姹犵殑澶?#28751;?#37510;傚惁鍒?#28028;氬?#30028;暐 BUFFPAGE ?#24364;鏁帮紝?#33503;涓?#37922;?NPAGES ?#24364;鏁版墍鎸囧畾?#27537;椤?#37825;?#37714;涘缓缂撳啿姹?#37510;?/div>
?#32531;璁?/div>
瀵逛簬浠?#28003;?#37922;ㄤ竴涓?#32514;撳啿姹犵殑搴?#37922;?#32459;?#25652;忥紝灏?NPAGES 鏇存敼鎴?-1?#32029;杩?#37837;?BUFFPAGE 灏?#37721;?#28000;?#37818;?#37714;?#29831;?#32514;撳啿姹犵殑澶?#28751;?#37510;?#26473;?#28003;?#23536;楁?#23384;柊鍜屾姤鍛?#32514;撳啿姹?#28598;?#28751;?#28000;?#37721;?#37711;跺畠 DB2 鏁版嵁搴撻厤缃弬鏁?#37721;?#23536;楁洿鍔犳?#36891;究銆?/div>
纭繚鍙?#28000;?#28003;?#37922;?#37825;版嵁搴撻厤缃腑?#27537; BUFFPAGE ?#24364;鏁版潵鎺?#37714;?#32514;撳啿姹?#28598;?#28751;忎箣?#24727;?#32029;灏?#29831;ュ弬鏁?#29825;?#32515;?#37812;?#37722;?#38315;傜殑鍊?#37510;傛牴?#23873;鏁版嵁搴撶殑澶?#28751;?#37724;?#25652;?#37922;?#32459;?#25652;忕殑鎬ц川灏?#29831;ュ弬鏁?#29825;?#32515;?#37812;愪竴涓?#37722;堢悊?#27537;澶?#37706;硷紝杩欑?#23941;?#27693;硶寰堝畨鍏?#37510;?#38315;氬父?#32029;璇ュ弬鏁扮殑缂虹渷鍊奸潪?#29238;灏忥紝鍙?#38003;芥弧瓒?#28051;嶄簡瑕佹眰銆?#29831;?#38000;冭檻涓嬪?#26945;儏鍐碉細
?#31476;寮濮嬶紝濡傛灉鎮ㄧ殑鏈?#37731;?#28051;?#37832;?#29906;?#28598;?#28598;х殑鍐呭瓨?#32029;璇?#28751;?BUFFPAGE 璁?#32515;?#37812;?40000 涓?#26916;碉紙160 MB锛?#38171;屾垨鑰呯瓑?#31788;鏈?#37731;?#37804;?#37712;呭瓨?#27537; 10%銆?nbsp;
瀵逛簬澶у瀷 OLTP 鏁版嵁搴擄紝鍦ㄤ繚鎸佺郴缁熺?#20914;畾?#27537;鍚屾椂涓?#32514;撳啿姹犵?#27407;嚭灏?#37721;?#38003;?#28598;氱殑鍐呭瓨銆備竴寮濮嬶紝鍏?#28751;?#29831;?#28003;?#37922;?1.6 GB ?#27537;鍐呭瓨?#32029;鐒跺悗灏?#29831;?#37922;ㄦ洿澶氬?#21613;瓨銆?nbsp;
濡備綍鏇存敼璇ュ弬鏁?/div>
杩?#29723;?#28051;嬮潰杩?#28051;?#38004;氭湰?#32029;浠?#28186;?#38171;?nbsp;
楠?#29831;?#37929;綍鍊?nbsp;
鍚?#37922;?#37825;版嵁搴撻厤缃弬鏁?BUFFPAGE 
鏇存?#29256;墍鏈?#37825;版嵁搴撶殑 BUFFPAGE 鍊?#37510;?nbsp;
db2 -v connect to DB_NAME
db2 -v select * from syscat.bufferpools
db2 -v alter bufferpool IBMDEFAULTBP size -1
db2 -v connect reset
db2 -v update db cfg for dbname using BUFFPAGE bigger_value
db2 -v terminate
鐮旂┒姝?#26976;?/div>
瑕佺‘?#30078;鏁版嵁搴撶殑缂撳啿姹?#28598;?#28751;忔槸?#24769;鐢?BUFFPAGE ?#24364;鏁版墍鍐冲畾?#32029;璇?#26473;?#29723;?#38171;?/div>
db2 -v connect to DB_NAME
db2 -v SELECT * from SYSCAT.BUFFERPOOLS
db2 -v connect reset
db2 -v terminate
妫鏌?#32513;撴灉銆傚?#20635;灉?#30241;涓?#32514;撳啿姹犻兘鏈変竴涓?#28051;?#8220;-1”?#27537; NPAGES 鍊硷紝閭?#28052;?#32514;撳啿姹?#28598;?#28751;忔槸鐢?#37825;版嵁搴撻厤缃腑?#27537; BUFFPAGE ?#24364;鏁版帶鍒剁殑銆?/div>
瑕佺‘?#30078;缂撳啿姹?#28598;?#28751;忔槸?#24769;瓒?#28598;?#28598;э紝璇?#37734;?#26473;?#29723;?#25652;?#37922;?#32459;?#25652;忔椂鏀?#38342;?#37825;版嵁搴撳拰锛?#37812;?#32514;撳啿姹犵殑?#25577;鐓?#37510;傜被浼间簬涓嬮潰?#27537;鑴氭湰涓?#37806;?#37819;?#28186;?#26473;欎簺鎵?#28214;?#27537;?#20426;鎭?#38171;?/div>
db2 -v update monitor switches using bufferpool on
db2 -v get monitor switches
db2 -v reset monitor all
-- run your application --
db2 -v get snapshot for all databases > snap.out
db2 -v get snapshot for dbm >> snap.out
db2 -v get snapshot for all bufferpools >> snap.out
db2 -v reset monitor all
db2 -v terminate
璇?#32429;繚鎮?#37734;?#37826;?#23534;鏁版嵁搴撹?#28852;帴?#31651;鍓嶅彂?#22189;“db2 -v get snapshot”銆傚?#25780;渶?#24727;?#31476;涓?#25652;?#37922;?#32459;?#25652;?#28051;?#37825;版嵁搴?#37826;?#23534;杩炴帴?#26882;?#32029;璇?#37825;版嵁搴撳仠姝?#26473;?#29723;岋紝鍚屾椂鎵鏈夊揩鐓?#32513;?#29825;′俊鎭?#28751;?#28028;?#28051;?#28598;?#37510;?#29781;佺‘?#32346;?#31476;?#27967;?#29928;鍦?#28003;?#37825;版嵁搴撳?#21226;簬姝e父杩?#29723;岀姸鎬佺殑杩炴帴?#32029;璇?#28003;?#37922;?#28051;嬪垪鏂规硶?#31651;?#31476;锛?/div>
鍦?#37824;?#38342;嗗揩鐓х殑绐楀彛?#33105;?#32346;鎸佷竴涓?#37719;?#37913;殑杩炴帴銆?nbsp;
浣?#37922;?DB2 ACTIVATE DATABASE 鍛?#28000;?#37510;?/div>
鍦?#37825;版嵁搴撳揩鐓?#37812;?#32514;撳啿姹犲揩鐓х殑?#25577;鐓?#26440;撳?#36720;腑锛屾煡鎵?#28051;嬪垪“logical reads”鍜?#8220;physical reads”?#32029;杩?#37837;?#28751;?#37721;?#28000;?#29825;?#32480;楀嚭缂撳啿姹?#37723;戒腑鐜囷紝?#30048;鍙?#28000;?#29999;?#37716;?#37806;ㄨ皟浼?#32514;撳啿姹?#38171;?/div>
-- Related lines from a sample of bufferpool snapshots --
Buffer pool data logical reads = 702033
Buffer pool data physical reads = 0
Buffer pool data writes = 414
Buffer pool index logical reads = 168255
Buffer pool index physical reads = 0
缂撳啿姹?#37723;戒腑鐜?#29723;?#37828;?#37825;版嵁搴撶?#24714;鍣?#28051;嶉渶瑕佷粠纾?#37929;樿?#21613;叆椤碉紙鍗?#29831;?#26916;靛凡缁?#37734;?#32514;撳啿姹犱腑锛?#28751;?#38003;?#28598;勭悊椤?#29831;锋眰?#27537;?#26882;闂寸櫨鍒嗘瘮銆?#32514;撳啿姹犵殑鍛戒腑鐜囪秺?#29678;?#32029;浣?#37922;?#32446;?#37929;?I/O ?#27537;棰?#37916;?#28751;辫秺浣?#37510;傛寜濡?#28051;?#29825;?#32480;?#32514;撳啿姹?#37723;戒腑鐜?#38171;?/div>
(1 - ((buffer pool data physical reads + buffer pool index physical reads) /
(buffer pool data logical reads + pool index logical reads))
) * 100%
杩?#28051;?#29825;?#32480;?#38000;冭檻?#31777;缂撳啿姹犻珮閫?#32514;撳瓨?#27537;鎵鏈?#26916;碉紙?#20648;寮?#37724;屾?#29256;嵁锛夈傜悊鎯虫儏鍐?#28051;嬶紝璇ユ瘮鐜?#25652;斿?#25785;秴杩?95%?#32029;?#33503;灏?#37721;?#38003;芥帴杩?100%銆?#29781;?#37819;愰珮缂撳啿姹?#37723;戒腑鐜囷紝璇?#28751;?#29831;?#28051;嬮潰杩欎簺鏂规硶锛?/div>
澧?#37716;?#32514;撳啿姹?#28598;?#28751;?#37510;?nbsp;
鑰冭檻鍒嗛厤澶?#28051;?#32514;撳啿姹狅紝濡傛灉鍙?#38003;界殑璇濓紝涓烘瘡涓?#32513;忓父琚?#29825;块棶?#27537;澶?#29723;?#37813;灞炵殑琛?#32460;?#38338;?#37714;嗛厤?#31476;涓?#32514;撳啿姹狅紝涓轰竴缁?#28751;?#29723;?#37714;嗛厤?#31476;涓?#32514;撳啿姹狅紝鐒跺悗灏?#29831;曚竴涓?#28003;?#37922;?#28051;嶅悓澶?#28751;忕殑缂撳啿姹?#28000;?#37836;?#37930;嬪摢绉?#32513;勫悎浼?#37819;?#28186;涙渶浣?#37804;?#38003;?#37510;?nbsp;
濡傛灉?#20961;鍒嗛厤?#27537;鍐呭瓨涓?#38003;?#29999;?#37716;?#37819;愰珮鎬?#38003;斤紝閭?#28052;?#29831;?#38316;?#37711;?#32513;?#32514;撳啿姹?#37714;嗛厤杩?#28598;氱殑鍐呭瓨銆?#25652;斿?#25780;牴?#23873;?#24391;鑷祴璇?#37916;?#28583;冪殑?#25577;鐓т俊鎭?#37833;?#37712;冲畾缂撳啿姹犵殑澶?#28751;?#37510;?/div>

缂撳啿姹?#37723;戒腑鐜?/p>

杩?#28051;瘮鐜?#29831;存?#24221;簡涓?#26916;甸潰璇锋眰鎻?#28186;?#37832;嶅姟?#26882;锛屾?#29256;嵁搴撶?#24714;鍣?#28051;嶉渶?#31904;纾?#37929;樿?#21613;叆椤碉紙鍗?#29831;?#26916;靛凡缁?#37734;?#32514;撳啿姹犱腑锛?#28751;?#38003;?#28598;勭悊椤?#29831;锋眰?#27537;?#26882;闂寸櫨鍒嗘瘮銆?/p>

璁?#32480;?#38171;?/p>

BPHR = (1 - ((缂撳啿姹犳?#29256;嵁?#22719;?#24714;璇?+ 缂撳啿姹犵储寮曠墿?#24714;璇? /

(缂撳啿姹犳?#29256;嵁閫昏緫璇?+ 缂撳啿姹犵储寮曢昏緫璇? ) ) * 100%

?#20648;寮?#37723;戒腑鐜?/p>

杩?#28051;瘮鐜?#29723;?#37828;庝簡鍙?#28000;?#37734;?#32514;撳啿姹犱腑鎵?#37714;扮殑椤甸潰鑳?#28598;熸弧瓒崇殑瀵圭储寮?#26916;电殑鎵鏈?#29831;?#29831;锋眰鎵鍗犵殑?#27368;鍒嗘瘮銆?/p>

璁?#32480;?#38171;?/p>

IHR = (1 - (缂撳啿姹犵储寮曠墿?#24714;璇?/ 缂撳啿姹犵储寮曢昏緫璇? ) ) * 100%

鏁版嵁鍛戒腑鐜?/p>

杩?#28051;瘮鐜?#29831;存?#24221;簡鍙?#28000;?#37734;?#32514;撳啿姹犱腑鎵?#37714;扮殑椤甸潰鑳?#28598;熸弧瓒崇殑瀵?#37825;版嵁椤电殑鎵鏈?#29831;?#29831;锋眰鎵鍗犵殑?#27368;鍒嗘瘮銆?/p>

璁?#32480;?#38171;?/p>

DHR = (1 - (缂撳啿姹犳?#29256;嵁?#22719;?#24714;璇?/ 缂撳啿姹犳?#29256;嵁閫昏緫璇? ) ) * 100%

缁撹

缂撳啿姹?#37723;戒腑鐜?#28598;т簬 80% 琚?#29825;?#28051;烘槸?#24714;鎯崇殑銆?#28725;逛簬 OLTP ?#37108;缁?#37833;?#29831;达紝璇?#37706;肩殑?#24714;鎯虫儏鍐墊槸灏?#37721;?#38003;芥帴杩戜簬 100% ?#32025;?#20648;寮?#37723;戒腑鐜?#37831;存槸濡?#23005;?#38171;夈?/p>

瑕?#37819;愰珮缂撳啿姹犵殑鍛戒腑鐜囷紝鍙?#28000;?#28583;?#37716;?#32514;撳啿姹犵殑澶?#28751;忥紝涔?#37721;?#28000;?#38000;冭檻鍒嗛厤澶?#28051;?#32514;撳啿姹狅紝鍙?#28000;?#28051;烘瘡涓?#32513;忓父璁块棶?#27537;鍏?#37832;?#38007;?#23480;辩殑琛?#32460;?#38338;寸殑澶у瀷琛?#28003;?#37922;ㄤ竴涓?#32514;撳啿姹狅紝涔?#37721;?#28000;?#28051;轰竴缁?#28751;忓瀷琛?#28003;?#37922;ㄤ竴涓?#32514;撳啿姹?#37510;?/p>

Prayer 2019-06-24 10:09 鍙?#29723;?#29831;?#29825;?/a>
]]>
UltraEdit璁?#32515;?#28051;婚http://www.2676208.com/prayer/archive/2019/06/03/216394.htmlPrayerPrayerMon, 03 Jun 2019 10:20:00 GMThttp://www.2676208.com/prayer/archive/2019/06/03/216394.htmlhttp://www.2676208.com/prayer/comments/216394.htmlhttp://www.2676208.com/prayer/archive/2019/06/03/216394.html#Feedback0http://www.2676208.com/prayer/comments/commentRss/216394.htmlhttp://www.2676208.com/prayer/services/trackbacks/216394.htmlhttps://blog.csdn.net/haifeilang/article/details/54959450
?#30241;娆?#28051;嬭?#33445;渶鏂扮殑UltraEdit?#32029;?#31919;璁?#28051;婚?#27195;槸榛戣壊?#32029;寰?#28051;?#38315;?#25652;?#38171;屾?#34411;?#23384;敼涓婚鍙堝父?#29238;鎵?#28051;嶅埌鍦?#37725;?#38322;岋紝
?#28214;鏂癠ltraedit璁?#32515;?#28051;婚鍜岃佺増鏈?#28051;?#28598;竴鏍?#38171;屾墍浠?#32515;?#28051;?#32513;?#26976;屾病澶?#28598;?#29999;?#37716;?#37510;?/div>
璁板綍鍒?#37719;氬?#32029;浠?#28598;?#28051;嶆椂?#31651;?#28214;锛?/div>
Ultraedit -->甯冨眬?#32025;Layout锛?->涓婚?#27208;紙Themes锛?/div>
      
閫?#37815;?#38007;?#23480;卞枩娆㈢殑涓婚鍚?#38171;?/div>
--------------------- 
浣?#38000;?#38171;歨aifeilang 
鏉ユ簮锛欳SDN 
鍘?#37826;?#38171;歨ttps://blog.csdn.net/haifeilang/article/details/54959450 
?#22679;鏉冨?#29256;槑锛氭湰鏂?#28051;?#37719;?#28051;诲師鍒?#37826;囩?#29381;紝?#27974;?#27975;璇?#38340;?#28051;?#37719;?#37826;?#38334;炬帴锛?/div>


]]>nm鍛?#28000;や腑绗?#37721;风?#35826;瀷璇?#29785;?/title><link>http://www.2676208.com/prayer/archive/2019/04/10/216346.html</link><dc:creator>Prayer</dc:creator><author>Prayer</author><pubDate>Wed, 10 Apr 2019 06:28:00 GMT</pubDate><guid>http://www.2676208.com/prayer/archive/2019/04/10/216346.html</guid><wfw:comment>http://www.2676208.com/prayer/comments/216346.html</wfw:comment><comments>http://www.2676208.com/prayer/archive/2019/04/10/216346.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.2676208.com/prayer/comments/commentRss/216346.html</wfw:commentRss><trackback:ping>http://www.2676208.com/prayer/services/trackbacks/216346.html</trackback:ping><description><![CDATA[<p style="font-family: 寰?#26462;?#38342;?#27035;? 瀹?#28003;? 榛?#28003;? Arial, Helvetica, sans-serif; color: #2f2f2f; font-size: 16px; line-height: 24px; background-color: #ffffff;">nm鍛?#28000;?#28000;?#32513;嶇殑寰?#28598;氾紝浣?#28598;?#28598;?#28051;?#28000;?#32513;?#37711;跺嚱鏁扮鍙?#37837;?#36423;楃殑?#24776;涔夈?br />?#28214;杩?#37734;ㄨ皟璇?#37716;?#37804;?#25652;撴椂?#29238;鐢?#37714;帮紝鍏朵腑鐢ㄧ殑?#28214;澶氱殑鐢ㄦ硶:<br />nm -A * |grep “aaa” | c++filt  // -A 涓轰簡鏄剧ず鏂?#28000;讹紝 c++filt?#27974;鎹?#28051;?#37721;?#29831;婚鏍硷紝濂藉儚鏈?#28051;弬鏁?#28052;?#38003;?#28729;?#37916;扮被浼?#37716;?#38003;?/p><p style="font-family: 寰?#26462;?#38342;?#27035;? 瀹?#28003;? 榛?#28003;? Arial, Helvetica, sans-serif; color: #2f2f2f; font-size: 16px; line-height: 24px; background-color: #ffffff;"><br />鍏?#28000;?#37712;呭鏁寸悊濡?#28051;嬶紙鍘?#28003;?#38000;?#37832;?#37933;?:</p><p style="font-family: 寰?#26462;?#38342;?#27035;? 瀹?#28003;? 榛?#28003;? Arial, Helvetica, sans-serif; color: #2f2f2f; font-size: 16px; line-height: 24px; background-color: #ffffff;"><span style="font-family: 'Times New Roman'; font-size: 12pt;"><span style="font-family: inherit; background-color: #fffe65;">nm</span></span><span style="font-family: 瀹?#28003;? font-size: 12pt;">鐢ㄤ簬鍒楀嚭鐩?#37837;?#37826;?#28000;剁殑绗?#37721;锋竻鍗曪紝濡傛灉?#30149;鏈夋?#22247;畾鐩?#37837;?#37826;?#28000;讹紝鍒欓粯璁?#28051;?#8220;</span><span style="font-family: 'Times New Roman'; font-size: 12pt;">a.out</span><span style="font-family: 瀹?#28003;? font-size: 12pt;">”銆?/span><span style="font-family: 'Times New Roman'; font-size: 12pt;"><span style="font-family: inherit; background-color: #fffe65;">nm</span></span><span style="font-family: 瀹?#28003;? font-size: 12pt;">?#27537;鏍?#23534;忓涓?#38171;?/span></p><p style="font-family: 寰?#26462;?#38342;?#27035;? 瀹?#28003;? 榛?#28003;? Arial, Helvetica, sans-serif; color: #2f2f2f; font-size: 16px; line-height: 24px; background-color: #ffffff;"><span style="font-family: 瀹?#28003;? font-size: 12pt;"><span style="font-family: inherit; font-size: 9pt;"><span style="font-family: Arial; font-size: small;"><span style="font-family: inherit; background-color: #fffe65;">nm</span> [‘-a’|‘--debug-syms’] [‘-g’|‘--extern-only’]</span></span><br /><span style="font-family: Arial;"><span style="font-family: inherit; font-size: small;"><span style="font-family: inherit;">         [‘-B’] [‘-C’|‘--demangle’[=style]] [‘-D’|‘--dynamic’]</span></span></span><br /><span style="font-family: Arial;"><span style="font-family: inherit; font-size: small;"><span style="font-family: inherit;">         [‘-S’|‘--print-size’] [‘-s’|‘--print-armap’]</span></span></span><br /><span style="font-family: Arial;"><span style="font-family: inherit; font-size: small;"><span style="font-family: inherit;">         [‘-A’|‘-o’|‘--print-file-name’][‘--special-syms’]</span></span></span><br /><span style="font-family: Arial;"><span style="font-family: inherit; font-size: small;"><span style="font-family: inherit;">         [‘-n’|‘-v’|‘--numeric-sort’] [‘-p’|‘--no-sort’]</span></span></span><br /><span style="font-family: Arial;"><span style="font-family: inherit; font-size: small;"><span style="font-family: inherit;">         [‘-r’|‘--reverse-sort’] [‘--size-sort’] [‘-u’|‘--undefined-only’]</span></span></span><br /><span style="font-family: Arial;"><span style="font-family: inherit; font-size: small;"><span style="font-family: inherit;">         [‘-t’ radix|‘--radix=’radix] [‘-P’|‘--portability’]</span></span></span><br /><span style="font-family: Arial;"><span style="font-family: inherit; font-size: small;"><span style="font-family: inherit;">         [‘--target=’bfdname] [‘-f’format|‘--format=’format]</span></span></span><br /><span style="font-family: Arial;"><span style="font-family: inherit; font-size: small;"><span style="font-family: inherit;">         [‘--defined-only’] [‘-l’|‘--line-numbers’] [‘--no-demangle’]</span></span></span><br /><span style="font-family: inherit; font-size: small;"><span style="font-family: Arial;"><span style="font-family: inherit; font-size: 9pt;">       </span></span><span style="font-family: Arial;"> <span style="font-family: inherit; font-size: 9pt;">[‘-V’|‘--version’] [‘-X 32_64’] [‘--help’] [objfile...]</span></span></span><br /><span style="font-family: Arial;"><span style="font-family: inherit; font-size: small;"><span style="font-family: inherit; font-size: 9pt;">  </span></span></span><br /><span style="font-family: inherit; font-size: small;">瀵逛簬?#30241;?#31476;涓?#32471;?#37721;凤紝<span style="font-family: inherit; background-color: #fffe65;">nm</span>鍒楀嚭鍏?#37706;?the symbol value)?#32029;绫诲?#23350;紙the symbol type锛?#37724;?#37711;跺?#23941;瓧(the symbol name)銆?/span><br /><span style="font-family: inherit; font-size: 12pt;">濡?#28051;?#28186;?#38171;?/span><br /><span style="font-family: inherit; font-size: 12pt;">  </span><br />     00000024 T cleanup_before_linux<br />     00000018 T cpu_init<br /><span style="font-family: inherit; font-size: 9pt;"><span style="font-family: inherit; font-size: small;">     00000060 T dcache_disable</span></span><br /><span style="font-family: inherit; font-size: 9pt;"><span style="font-family: inherit; font-size: small;">     00000054 T dcache_enable</span></span><br /><span style="font-family: inherit; font-size: 9pt;"><span style="font-family: inherit; font-size: small;">     0000006c T dcache_status</span></span><br /><span style="font-family: inherit; font-size: 9pt;"><span style="font-family: inherit; font-size: small;">     00000000 T do_reset</span></span><br /><span style="font-family: inherit; font-size: 9pt;"><span style="font-family: inherit; font-size: small;">     0000003c T icache_disable</span></span><br /><span style="font-family: inherit; font-size: 9pt;"><span style="font-family: inherit; font-size: small;">     00000030 T icache_enable</span></span><br /><span style="font-family: inherit; font-size: 9pt;"><span style="font-family: inherit; font-size: small;">     00000048 T icache_status</span></span><br /><span style="font-family: inherit; font-size: 9pt;"><span style="font-family: inherit; font-size: small;"> <br />涓婇潰?#27537;鏄剧?#28888;槸浣?#37922;?span style="font-family: inherit; background-color: #fffe65;">nm</span> cpu.o?#27537;杈撳嚭?#32029;瀵逛簬cleanup_before_linux杩?#28051;?#32471;?#37721;?#37833;?#29831;达紝00000024?#27128;浠?6?#32344;鍒?#37828;剧?#34425;殑鍏?#37706;硷紝T涓?#37711;剁?#35826;?#23350;紝鑰宑leanup_before_linux?#27128;鍏跺?#23941;瓧銆傚彲浠?#37930;嬪嚭?#32029;涓婇潰鏄剧?#34425;殑<span style="font-family: inherit; color: blue;">cleanup_before_linux</span><span style="font-family: inherit; color: blue;">杩?#28051;?/span><span style="font-family: inherit; color: blue;">symbol</span><span style="font-family: inherit; color: blue;">?#27537;鍊?#28729;?#38340;?#28051;婃槸璇?#37713;?#37825;?#37734;?/span><span style="font-family: inherit; color: blue;">text section</span><span style="font-family: inherit; color: blue;">?#33105;?#27537;鍋忕Щ銆備?#21976;槸锛屾瘡涓?#32471;?#37721;风殑鍊肩殑鍏?#28003;撳惈涔?#28186;?#37711;剁?#35826;瀷鑰?#23534;?/span>銆傚?#25782;?#35769;紝瀵逛簬?#30241;涓?#32471;?#37721;风殑鍊硷紝鍏剁?#35826;瀷銆?#37711;?#37706;?#28000;?#37721;婂畠浠?#37813;灞炵殑section?#27128;瀵?#37714;?#37929;?#37711;崇殑銆?br />涓嬮潰璇存?#24227;鍙风?#35826;瀷锛?span style="font-family: inherit; font-size: 12pt;">瀵逛簬?#30241;?#31476;涓?#32471;?#37721;?#37833;?#29831;达紝鍏剁?#35826;?#23338;?#20635;灉?#27128;灏?#37712;欑殑?#32029;鍒?#29723;?#37828;?#29831;?#32471;?#37721;锋槸</span><span style="font-family: inherit; font-size: 12pt;">local</span><span style="font-family: inherit; font-size: 12pt;">?#27537;锛?#28598;?#37712;?#37714;?#29723;?#37828;?#29831;?#32471;?#37721;锋槸</span><span style="font-family: inherit; font-size: 12pt;">global(external)</span><span style="font-family: inherit; font-size: 12pt;">?#27537;銆?/span></span></span></span></p><table border="1" cellpadding="0" cellspacing="0" style="color: #2f2f2f; font-family: 寰?#26462;?#38342;?#27035;? 瀹?#28003;? 榛?#28003;? Arial, Helvetica, sans-serif; font-size: 16px; line-height: 24px; background-color: #ffffff; border-collapse: collapse; margin-left: 14.4pt;"><tbody><tr><td valign="top" width="48" style="margin: 0px; padding: 0cm 5.4pt; width: 36pt; border: 1.5pt double silver;"><strong><span style="font-family: inherit; font-size: 9pt;">绗?#37721;?/span></strong><br /><strong><span style="font-family: inherit; font-size: 9pt;">绫诲瀷</span></strong></td><td valign="top" width="504" style="margin: 0px; padding: 0cm 5.4pt; border-bottom-color: silver; border-width: 1.5pt 1.5pt 1.5pt medium; border-style: double double double none; width: 378pt; border-top-color: silver; border-right-color: silver;"><strong><span style="font-family: inherit; font-size: 9pt;">璇存槑</span></strong></td></tr><tr><td valign="top" width="48" style="margin: 0px; padding: 0cm 5.4pt; border-bottom-color: silver; border-width: medium 1.5pt 1.5pt; border-style: none double double; border-left-color: silver; width: 36pt; border-right-color: silver;"><span style="font-family: inherit; font-size: 9pt;">A</span></td><td valign="top" width="504" style="margin: 0px; padding: 0cm 5.4pt; border-bottom-color: silver; border-width: medium 1.5pt 1.5pt medium; border-style: none double double none; width: 378pt; border-right-color: silver;"><span style="font-family: inherit; font-size: 9pt;">璇?#32471;?#37721;风殑鍊兼槸缁?#28725;圭殑?#32029;鍦?#28000;?#37722;庣殑閾炬帴杩?#32459;嬩腑?#32029;涓?#37711;?#29825;歌繘琛屾敼鍙?#37510;?#26473;?#37837;风殑<span style="font-family: inherit; color: blue;">绗?#37721;?#37706;硷紝?#29238;?#29238;鍑虹幇鍦ㄤ腑鏂?#37722;?#38322;?#29723;ㄤ腑?#32029;渚嬪鐢?#32471;?#37721;?#37833;?#29723;?#32448;?#37722;?#28051;腑鏂?#37722;?#38322;忓嚱鏁?#37734;ㄤ腑鏂?#37722;?#38322;?#29723;ㄤ腑?#27537;浣?#32515;?#37510;?/span></span></td></tr><tr><td valign="top" width="48" style="margin: 0px; padding: 0cm 5.4pt; border-bottom-color: silver; border-width: medium 1.5pt 1.5pt; border-style: none double double; border-left-color: silver; width: 36pt; border-right-color: silver;"><span style="font-family: inherit; font-size: 9pt;">B</span></td><td valign="top" width="504" style="margin: 0px; padding: 0cm 5.4pt; border-bottom-color: silver; border-width: medium 1.5pt 1.5pt medium; border-style: none double double none; width: 378pt; border-right-color: silver;"><span style="font-family: inherit; font-size: 9pt;">璇?#32471;?#37721;风殑鍊?#37713;虹幇鍦ㄩ潪鍒?#28654;?#37718;?#37825;版嵁娈?/span><span style="font-family: inherit; font-size: 9pt;">(bss)</span><span style="font-family: inherit; font-size: 9pt;">?#33105;銆備?#23338;?#20646;紝<span style="font-family: inherit; color: blue;">鍦ㄤ竴涓?#37826;?#28000;朵腑瀹氫箟鍏?#28766;</span></span><span style="font-family: inherit; color: blue; font-size: 9pt;">static int test</span><span style="font-family: inherit; color: blue; font-size: 9pt;">銆傚垯璇?#32471;?#37721;?/span><span style="font-family: inherit; color: blue; font-size: 9pt;">test</span><span style="font-family: inherit; color: blue; font-size: 9pt;">?#27537;绫诲瀷涓?/span><span style="font-family: inherit; color: blue; font-size: 9pt;">b</span><span style="font-family: inherit; color: blue; font-size: 9pt;">?#32029;浣嶄簬</span><span style="font-family: inherit; color: blue; font-size: 9pt;">bss section</span><span style="font-family: inherit; color: blue; font-size: 9pt;">?#33105;銆傚叾鍊?#29723;?#32448;?#29831;?#32471;?#37721;?#37734;?/span><span style="font-family: inherit; color: blue; font-size: 9pt;">bss</span><span style="font-family: inherit; color: blue; font-size: 9pt;">娈典腑?#27537;鍋忕Щ銆備竴鑸?#38000;岃█?#32029;</span><span style="font-family: inherit; color: blue; font-size: 9pt;">bss</span><span style="font-family: inherit; color: blue; font-size: 9pt;">娈?#37714;嗛厤?#31788;</span><span style="font-family: inherit; color: blue; font-size: 9pt;">RAM</span><span style="font-family: inherit; color: blue; font-size: 9pt;">?#33105;</span></td></tr><tr><td valign="top" width="48" style="margin: 0px; padding: 0cm 5.4pt; border-bottom-color: silver; border-width: medium 1.5pt 1.5pt; border-style: none double double; border-left-color: silver; width: 36pt; border-right-color: silver;"><span style="font-family: inherit; font-size: 9pt;">C</span></td><td valign="top" width="504" style="margin: 0px; padding: 0cm 5.4pt; border-bottom-color: silver; border-width: medium 1.5pt 1.5pt medium; border-style: none double double none; width: 378pt; border-right-color: silver;"><span style="font-family: inherit; font-size: 9pt;">璇?#32471;?#37721;?#28051;?/span><span style="font-family: inherit; font-size: 9pt;">common</span><span style="font-family: inherit; font-size: 9pt;">銆?/span><span style="font-family: inherit; font-size: 9pt;">common symbol</span><span style="font-family: inherit; font-size: 9pt;">?#27128;鏈?#37714;?#28654;?#29831;?#37825;版嵁娈?#37510;?span style="font-family: inherit; color: blue;">璇?#32471;?#37721;锋病鏈?#37718;呭惈?#31788;?#31476;涓櫘閫?/span></span><span style="font-family: inherit; color: blue; font-size: 9pt;">section</span><span style="font-family: inherit; color: blue; font-size: 9pt;">?#33105;銆傚彧鏈?#37734;?#38334;炬帴杩?#32459;嬩腑鎵嶈繘琛屽?#21979;厤銆傜鍙风殑鍊?#29723;?#32448;?#29831;?#32471;?#37721;烽渶瑕佺殑瀛楄妭鏁?#37510;備?#23338;鍦ㄤ竴涓?/span><span style="font-family: inherit; color: blue; font-size: 9pt;">c</span><span style="font-family: inherit; color: blue; font-size: 9pt;">鏂?#28000;朵腑?#32029;瀹氫箟</span><span style="font-family: inherit; color: blue; font-size: 9pt;">int test</span><span style="font-family: inherit; color: blue; font-size: 9pt;">?#32029;?#33503;涓?#29831;?#32471;?#37721;?#37734;?#37714;殑鍦版柟浼?#29722;?#23534;?#37922;紝鍒?#29831;?#32471;?#37721;风?#35826;瀷鍗?#28051;?/span><span style="font-family: inherit; color: blue; font-size: 9pt;">C</span><span style="font-family: inherit; color: blue; font-size: 9pt;">銆傚惁鍒?#37711;剁?#35826;瀷涓?/span><span style="font-family: inherit; color: blue; font-size: 9pt;">B</span><span style="font-family: inherit; color: blue; font-size: 9pt;">銆?/span></td></tr><tr><td valign="top" width="48" style="margin: 0px; padding: 0cm 5.4pt; border-bottom-color: silver; border-width: medium 1.5pt 1.5pt; border-style: none double double; border-left-color: silver; width: 36pt; border-right-color: silver;"><span style="font-family: inherit; font-size: 9pt;">D</span></td><td valign="top" width="504" style="margin: 0px; padding: 0cm 5.4pt; border-bottom-color: silver; border-width: medium 1.5pt 1.5pt medium; border-style: none double double none; width: 378pt; border-right-color: silver;"><span style="font-family: inherit; font-size: 9pt;">璇?#32471;?#37721;?#28003;嶄簬鍒?#28654;?#29831;?#37825;版嵁娈典腑銆?span style="font-family: inherit; color: blue;">?#31476;鑸?#37833;?#29831;达紝鍒嗛厤鍒?/span></span><span style="font-family: inherit; color: blue; font-size: 9pt;">data section</span><span style="font-family: inherit; color: blue; font-size: 9pt;">?#33105;銆備?#23338;?#20634;?#27691;箟鍏?#28766;</span><span style="font-family: inherit; color: blue; font-size: 9pt;">int baud_table[5] = {9600, 19200, 38400, 57600, 115200}</span><span style="font-family: inherit; color: blue; font-size: 9pt;">?#32029;鍒?#28028;氬?#21979;厤?#31788;鍒?#28654;?#37718;?#37825;版嵁娈典腑</span><span style="font-family: inherit; font-size: 9pt;">銆?/span></td></tr><tr><td valign="top" width="48" style="margin: 0px; padding: 0cm 5.4pt; border-bottom-color: silver; border-width: medium 1.5pt 1.5pt; border-style: none double double; border-left-color: silver; width: 36pt; border-right-color: silver;"><span style="font-family: inherit; font-size: 9pt;">G</span></td><td valign="top" width="504" style="margin: 0px; padding: 0cm 5.4pt; border-bottom-color: silver; border-width: medium 1.5pt 1.5pt medium; border-style: none double double none; width: 378pt; border-right-color: silver;"><span style="font-family: inherit; font-size: 9pt;">璇?#32471;?#37721;?#28052;?#28003;嶄簬鍒?#28654;?#37718;?#37825;版嵁娈典腑銆?#28051;?#29781;?#37922;ㄤ簬</span><span style="font-family: inherit; font-size: 9pt;">small object</span><span style="font-family: inherit; font-size: 9pt;">鎻愰珮璁块棶</span><span style="font-family: inherit; font-size: 9pt;">small data object</span><span style="font-family: inherit; font-size: 9pt;">?#27537;?#31476;绉?#37826;?#23534;?#37510;?/span></td></tr><tr><td valign="top" width="48" style="margin: 0px; padding: 0cm 5.4pt; border-bottom-color: silver; border-width: medium 1.5pt 1.5pt; border-style: none double double; border-left-color: silver; width: 36pt; border-right-color: silver;"><span style="font-family: inherit; font-size: 9pt;">I</span></td><td valign="top" width="504" style="margin: 0px; padding: 0cm 5.4pt; border-bottom-color: silver; border-width: medium 1.5pt 1.5pt medium; border-style: none double double none; width: 378pt; border-right-color: silver;"><span style="font-family: inherit; font-size: 9pt;">璇?#32471;?#37721;锋槸瀵?#37721;︿竴涓?#32471;?#37721;风殑闂存帴寮?#37922;?#37510;?/span></td></tr><tr><td valign="top" width="48" style="margin: 0px; padding: 0cm 5.4pt; border-bottom-color: silver; border-width: medium 1.5pt 1.5pt; border-style: none double double; border-left-color: silver; width: 36pt; border-right-color: silver;"><span style="font-family: inherit; font-size: 9pt;">N</span></td><td valign="top" width="504" style="margin: 0px; padding: 0cm 5.4pt; border-bottom-color: silver; border-width: medium 1.5pt 1.5pt medium; border-style: none double double none; width: 378pt; border-right-color: silver;"><span style="font-family: inherit; font-size: 9pt;">璇?#32471;?#37721;锋槸?#31476;涓?/span><span style="font-family: inherit; font-size: 9pt;">debugging</span><span style="font-family: inherit; font-size: 9pt;">绗?#37721;?#37510;?/span></td></tr><tr><td valign="top" width="48" style="margin: 0px; padding: 0cm 5.4pt; border-bottom-color: silver; border-width: medium 1.5pt 1.5pt; border-style: none double double; border-left-color: silver; width: 36pt; border-right-color: silver;"><span style="font-family: inherit; font-size: 9pt;">R</span></td><td valign="top" width="504" style="margin: 0px; padding: 0cm 5.4pt; border-bottom-color: silver; border-width: medium 1.5pt 1.5pt medium; border-style: none double double none; width: 378pt; border-right-color: silver;"><span style="font-family: inherit; font-size: 9pt;">璇?#32471;?#37721;?#28003;嶄簬鍙?#29831;绘?#29256;嵁?#23599;銆?span style="font-family: inherit; color: blue;">渚嬪?#20634;?#27691;箟鍏?#28766;</span></span><span style="font-family: inherit; color: blue; font-size: 9pt;">const int test[] = {123, 123};</span><span style="font-family: inherit; color: blue; font-size: 9pt;">鍒?/span><span style="font-family: inherit; color: blue; font-size: 9pt;">test</span><span style="font-family: inherit; color: blue; font-size: 9pt;">灏辨槸?#31476;涓?#37721;?#29831;绘?#29256;嵁?#23599;?#27537;绗?#37721;?#37510;傛敞鎰?#37734;?/span><span style="font-family: inherit; color: blue; font-size: 9pt;">cygwin</span><span style="font-family: inherit; color: blue; font-size: 9pt;">涓嬪?#20635;灉浣?#37922;?/span><span style="font-family: inherit; color: blue; font-size: 9pt;">gcc</span><span style="font-family: inherit; color: blue; font-size: 9pt;">鐩存帴缂?#29831;?#37812;?/span><span style="font-family: inherit; color: blue; font-size: 9pt;">MZ</span><span style="font-family: inherit; color: blue; font-size: 9pt;">鏍?#23534;忔椂锛屾簮鏂?#28000;朵腑?#27537;</span><span style="font-family: inherit; color: blue; font-size: 9pt;">test</span><span style="font-family: inherit; color: blue; font-size: 9pt;">瀵?#25652;?/span><span style="font-family: inherit; color: blue; font-size: 9pt;">_test</span><span style="font-family: inherit; color: blue; font-size: 9pt;">?#32029;?#33503;涓?#37711;剁鍙风?#35826;瀷涓?/span><span style="font-family: inherit; color: blue; font-size: 9pt;">D</span><span style="font-family: inherit; color: blue; font-size: 9pt;">?#32029;鍗?#37714;?#28654;?#37718;?#37825;版嵁娈典腑銆備?#21976;槸濡傛灉浣?#37922;?/span><span style="font-family: inherit; color: blue; font-size: 9pt;">m6812-elf-gcc</span><span style="font-family: inherit; color: blue; font-size: 9pt;">杩?#37837;风殑浜?#37721;?#32514;?#29831;?#23480;?#37711;?#38171;屾簮鏂?#28000;朵腑?#27537;</span><span style="font-family: inherit; color: blue; font-size: 9pt;">test</span><span style="font-family: inherit; color: blue; font-size: 9pt;">瀵?#25652;?#37929;?#37837;?#37826;?#28000;剁殑</span><span style="font-family: inherit; color: blue; font-size: 9pt;">test,</span><span style="font-family: inherit; color: blue; font-size: 9pt;">鍗虫病鏈夋?#35826;姞涓嬪?#25492;?#21281;紝?#33503;涓?#37711;剁鍙风?#35826;瀷涓?/span><span style="font-family: inherit; color: blue; font-size: 9pt;">R</span><span style="font-family: inherit; color: blue; font-size: 9pt;">銆備竴鑸?#38000;岃█?#32029;浣嶄簬</span><span style="font-family: inherit; color: blue; font-size: 9pt;">rodata section</span><span style="font-family: inherit; color: blue; font-size: 9pt;">銆傚?#23536;楁敞鎰忕殑?#27128;?#32029;濡傛灉鍦ㄤ竴涓?#37713;?#37825;颁腑瀹氫箟</span><span style="font-family: inherit; color: blue; font-size: 9pt;">const char *test = “abc”, const char test_int = 3</span><span style="font-family: inherit; color: blue; font-size: 9pt;">銆備娇鐢?/span><span style="font-family: inherit; color: blue; font-size: 9pt;"><span style="font-family: inherit; background-color: #fffe65;">nm</span></span><span style="font-family: inherit; color: blue; font-size: 9pt;">?#20824;涓?#28028;氬?#26944;埌绗?#37721;蜂俊鎭紝浣嗘槸瀛楃涓?#8220;</span><span style="font-family: inherit; color: blue; font-size: 9pt;">abc</span><span style="font-family: inherit; color: blue; font-size: 9pt;">”鍒嗛厤?#31788;鍙?#29831;诲瓨鍌?#37731;ㄤ腑?#32029;</span><span style="font-family: inherit; color: blue; font-size: 9pt;">test</span><span style="font-family: inherit; color: blue; font-size: 9pt;">鍦?/span><span style="font-family: inherit; color: blue; font-size: 9pt;">rodata section</span><span style="font-family: inherit; color: blue; font-size: 9pt;">?#33105;?#32029;澶?#28751;?#28051;?/span><span style="font-family: inherit; color: blue; font-size: 9pt;">4</span><span style="font-family: inherit; color: blue; font-size: 9pt;">銆?/span></td></tr><tr><td valign="top" width="48" style="margin: 0px; padding: 0cm 5.4pt; border-bottom-color: silver; border-width: medium 1.5pt 1.5pt; border-style: none double double; border-left-color: silver; width: 36pt; border-right-color: silver;"><span style="font-family: inherit; font-size: 9pt;">S</span></td><td valign="top" width="504" style="margin: 0px; padding: 0cm 5.4pt; border-bottom-color: silver; border-width: medium 1.5pt 1.5pt medium; border-style: none double double none; width: 378pt; border-right-color: silver;"><span style="font-family: inherit; font-size: 9pt;">绗?#37721;?#28003;嶄簬?#28522;鍒?#28654;?#37718;?#37825;版嵁?#23599;?#32029;鐢ㄤ簬</span><span style="font-family: inherit; font-size: 9pt;">small object</span><span style="font-family: inherit; font-size: 9pt;">銆?/span></td></tr><tr><td valign="top" width="48" style="margin: 0px; padding: 0cm 5.4pt; border-bottom-color: silver; border-width: medium 1.5pt 1.5pt; border-style: none double double; border-left-color: silver; width: 36pt; border-right-color: silver;"><span style="font-family: inherit; font-size: 9pt;">T</span></td><td valign="top" width="504" style="margin: 0px; padding: 0cm 5.4pt; border-bottom-color: silver; border-width: medium 1.5pt 1.5pt medium; border-style: none double double none; width: 378pt; border-right-color: silver;"><span style="font-family: inherit; font-size: 9pt;">璇?#32471;?#37721;?#28003;嶄簬浠?#37934;佸尯</span><span style="font-family: inherit; font-size: 9pt;">text section</span><span style="font-family: inherit; font-size: 9pt;">銆?/span></td></tr><tr><td valign="top" width="48" style="margin: 0px; padding: 0cm 5.4pt; border-bottom-color: silver; border-width: medium 1.5pt 1.5pt; border-style: none double double; border-left-color: silver; width: 36pt; border-right-color: silver;"><span style="font-family: inherit; font-size: 9pt;">U</span></td><td valign="top" width="504" style="margin: 0px; padding: 0cm 5.4pt; border-bottom-color: silver; border-width: medium 1.5pt 1.5pt medium; border-style: none double double none; width: 378pt; border-right-color: silver;"><span style="font-family: inherit; font-size: 9pt;">璇?#32471;?#37721;?#37734;?#35120;撳墠鏂?#28000;朵腑?#27128;鏈?#28729;氫箟?#27537;?#32029;鍗?#29831;?#32471;?#37721;风殑瀹氫箟鍦?#37714;殑鏂?#28000;朵腑銆?span style="font-family: inherit; color: blue;">渚嬪?#20646;紝褰撳墠鏂?#28000;惰皟鐢?#37721;︿竴涓?#37826;?#28000;朵腑瀹氫箟?#27537;鍑?#37825;帮紝鍦?#26473;?#28051;?#29722;皟鐢ㄧ殑鍑?#37825;?#37734;?#35120;撳墠灏辨槸鏈?#28729;氫箟?#27537;锛?#28003;嗘槸鍦?#28729;氫?#22794;畠?#27537;鏂?#28000;朵腑绫诲瀷?#27128;</span></span><span style="font-family: inherit; color: blue; font-size: 9pt;">T</span><span style="font-family: inherit; color: blue; font-size: 9pt;">銆備?#21976;槸瀵逛簬鍏?#28766;鍙?#38322;?#37833;?#29831;达紝鍦?#28729;氫?#22794;畠?#27537;鏂?#28000;朵腑?#32029;鍏剁鍙风?#35826;瀷涓?/span><span style="font-family: inherit; color: blue; font-size: 9pt;">C</span><span style="font-family: inherit; color: blue; font-size: 9pt;">?#32029;鍦?#28003;?#37922;ㄥ畠?#27537;鏂?#28000;朵腑?#32029;鍏剁?#35826;瀷涓?/span><span style="font-family: inherit; color: blue; font-size: 9pt;">U</span><span style="font-family: inherit; color: blue; font-size: 9pt;">銆?/span></td></tr><tr><td valign="top" width="48" style="margin: 0px; padding: 0cm 5.4pt; border-bottom-color: silver; border-width: medium 1.5pt 1.5pt; border-style: none double double; border-left-color: silver; width: 36pt; border-right-color: silver;"><span style="font-family: inherit; font-size: 9pt;">V</span></td><td valign="top" width="504" style="margin: 0px; padding: 0cm 5.4pt; border-bottom-color: silver; border-width: medium 1.5pt 1.5pt medium; border-style: none double double none; width: 378pt; border-right-color: silver;"><span style="font-family: inherit; font-size: 9pt;">璇?#32471;?#37721;锋槸?#31476;涓?/span><span style="font-family: inherit; font-size: 9pt;">weak object</span><span style="font-family: inherit; font-size: 9pt;">銆?/span></td></tr><tr><td valign="top" width="48" style="margin: 0px; padding: 0cm 5.4pt; border-bottom-color: silver; border-width: medium 1.5pt 1.5pt; border-style: none double double; border-left-color: silver; width: 36pt; border-right-color: silver;"><span style="font-family: inherit; font-size: 9pt;">W</span></td><td valign="top" width="504" style="margin: 0px; padding: 0cm 5.4pt; border-bottom-color: silver; border-width: medium 1.5pt 1.5pt medium; border-style: none double double none; width: 378pt; border-right-color: silver;"><span style="font-family: inherit; font-size: 9pt;">The symbol is a weak symbol that has not been specifically tagged as a weak object symbol.</span></td></tr><tr><td valign="top" width="48" style="margin: 0px; padding: 0cm 5.4pt; border-bottom-color: silver; border-width: medium 1.5pt 1.5pt; border-style: none double double; border-left-color: silver; width: 36pt; border-right-color: silver;"><span style="font-family: inherit; font-size: 9pt;">-</span></td><td valign="top" width="504" style="margin: 0px; padding: 0cm 5.4pt; border-bottom-color: silver; border-width: medium 1.5pt 1.5pt medium; border-style: none double double none; width: 378pt; border-right-color: silver;"><span style="font-family: inherit; font-size: 9pt;">璇?#32471;?#37721;锋槸</span><span style="font-family: inherit; font-size: 9pt;">a.out</span><span style="font-family: inherit; font-size: 9pt;">鏍?#23534;?#37826;?#28000;朵腑?#27537;</span><span style="font-family: inherit; font-size: 9pt;">stabs symbol</span><span style="font-family: inherit; font-size: 9pt;">銆?/span></td></tr><tr><td valign="top" width="48" style="margin: 0px; padding: 0cm 5.4pt; border-bottom-color: silver; border-width: medium 1.5pt 1.5pt; border-style: none double double; border-left-color: silver; width: 36pt; border-right-color: silver;"></td><td valign="top" width="504" style="margin: 0px; padding: 0cm 5.4pt; border-bottom-color: silver; border-width: medium 1.5pt 1.5pt medium; border-style: none double double none; width: 378pt; border-right-color: silver;"><span style="font-family: inherit; font-size: 9pt;">璇?#32471;?#37721;风?#35826;瀷?#30149;鏈?#28729;氫箟</span></td></tr></tbody></table><img src ="http://www.2676208.com/prayer/aggbug/216346.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.2676208.com/prayer/" target="_blank">Prayer</a> 2019-04-10 14:28 <a href="http://www.2676208.com/prayer/archive/2019/04/10/216346.html#Feedback" target="_blank" style="text-decoration:none;">鍙?#29723;?#29831;?#29825;?/a></div>]]></description></item><item><title>sed -i鍛?#28000;?#29831;?#29785;?/title><link>http://www.2676208.com/prayer/archive/2019/04/04/216337.html</link><dc:creator>Prayer</dc:creator><author>Prayer</author><pubDate>Thu, 04 Apr 2019 09:49:00 GMT</pubDate><guid>http://www.2676208.com/prayer/archive/2019/04/04/216337.html</guid><wfw:comment>http://www.2676208.com/prayer/comments/216337.html</wfw:comment><comments>http://www.2676208.com/prayer/archive/2019/04/04/216337.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.2676208.com/prayer/comments/commentRss/216337.html</wfw:commentRss><trackback:ping>http://www.2676208.com/prayer/services/trackbacks/216337.html</trackback:ping><description><![CDATA[<div>https://www.cnblogs.com/ev-zhk/p/4277023.html<br /><div data-find="_2" style="margin: 5px 0px; font-size: 12px; line-height: 18px;"><pre data-find="_1" style="margin-top: 0px; margin-bottom: 0px; padding: 0px; white-space: pre-wrap; word-wrap: break-word; font-family: 'Courier New' !important;">[root@www ~]# <span style="margin: 0px; padding: 0px; color: #0000ff; line-height: 1.5 !important;">sed</span> [-<span style="margin: 0px; padding: 0px; line-height: 1.5 !important;">nefr] [鍔?#28003;淽 閫?#26916;?#28051;庡弬鏁?#38171;?</span>-n 锛氫娇鐢ㄥ畨闈?silent)妯?#23534;?#37510;?#37734;ㄤ竴鑸?<span style="margin: 0px; padding: 0px; color: #0000ff; line-height: 1.5 !important;">sed</span> ?#27537;鐢ㄦ硶?#33105;锛屾墍鏈夋潵鑷?STDIN ?#27537;鏁版嵁?#31476;鑸兘浼?#29722;?#37714;楀嚭鍒?#32513;堢涓?#37510;備絾濡傛灉鍔?#28051;?-<span style="margin: 0px; padding: 0px; line-height: 1.5 !important;">n ?#24364;鏁板悗?#32029;鍒?#37721;?#37832;?#32513;?#26473;噑ed 鐗规?#23106;?#21229;悊?#27537;閭d竴琛?鎴?#38000;呭姩浣?鎵?#28028;?#29722;?#37714;楀嚭鏉?#37510;?</span>-e 锛?#37929;存帴鍦?#37723;?#28000;?#37714;楁ā寮?#28051;婅繘琛?<span style="margin: 0px; padding: 0px; color: #0000ff; line-height: 1.5 !important;">sed</span><span style="margin: 0px; padding: 0px; line-height: 1.5 !important;"> ?#27537;鍔?#28003;?#32514;栬緫锛?</span>-f 锛?#37929;存帴灏?<span style="margin: 0px; padding: 0px; color: #0000ff; line-height: 1.5 !important;">sed</span> ?#27537;鍔?#28003;?#37712;?#37734;ㄤ竴涓?#37826;?#28000;?#37712;咃紝 -f filename 鍒?#37721;?#28000;?#26473;?#29723;?filename 鍐呯殑 <span style="margin: 0px; padding: 0px; color: #0000ff; line-height: 1.5 !important;">sed</span><span style="margin: 0px; padding: 0px; line-height: 1.5 !important;"> 鍔?#28003;?#38171;?</span>-r 锛?span style="margin: 0px; padding: 0px; color: #0000ff; line-height: 1.5 !important;">sed</span><span style="margin: 0px; padding: 0px; line-height: 1.5 !important;"> ?#27537;鍔?#28003;?#37824;?#37816;佺殑?#27128;寤?#28028;稿瀷姝?#29785;?#29723;?#32448;烘硶?#27537;璇硶銆??#31919;璁ゆ槸鍩虹姝?#29785;?#29723;?#32448;烘硶璇硶) </span>-<span style="margin: 0px; padding: 0px; line-height: 1.5 !important;">i 锛?#37929;存帴淇?#37824;?#29831;诲?#26667;殑鏂?#28000;?#37712;呭?#30328;紝鑰?#28051;嶆槸杈撳嚭鍒?#32513;堢銆? 鍔?#28003;?#29831;存槑锛?[n1[,n2]]</span><span style="margin: 0px; padding: 0px; color: #0000ff; line-height: 1.5 !important;">function</span><span style="margin: 0px; padding: 0px; line-height: 1.5 !important;"> n1, n2 锛?#28051;嶈寰?#28028;氬瓨鍦紝?#31476;鑸?#28000;?#29723;?#37510;?#38315;?#37815;╄繘琛屽姩浣滅殑琛屾暟銆忥紝涓?#28186;?#37833;?#29831;达紝濡傛灉鎴戠殑鍔?#28003;滄槸?#28214;瑕?#37734;?</span><span style="margin: 0px; padding: 0px; color: #800080; line-height: 1.5 !important;">10</span> 鍒?<span style="margin: 0px; padding: 0px; color: #800080; line-height: 1.5 !important;">20</span> 琛屼箣闂磋繘琛岀殑?#32029;鍒?#37510;?<span style="margin: 0px; padding: 0px; color: #800080; line-height: 1.5 !important;">10</span>,<span style="margin: 0px; padding: 0px; color: #800080; line-height: 1.5 !important;">20</span><span style="margin: 0px; padding: 0px; line-height: 1.5 !important;">[鍔?#28003;?#29723;?#28051;篯 銆? </span><span style="margin: 0px; padding: 0px; color: #0000ff; line-height: 1.5 !important;">function</span><span style="margin: 0px; padding: 0px; line-height: 1.5 !important;">锛?a 锛?#37826;板?#28871;紝 a ?#27537;?#24727;?#28528;鍙?#28000;ユ帴瀛?#28051;詫紝鑰?#26473;欎簺瀛?#28051;?#28028;氬湪鏂扮殑?#31476;琛屽?#34425;幇(鐩?#37715;嶇殑涓嬩竴琛?锝?c 锛氬彇浠o紝 c ?#27537;?#24727;?#28528;鍙?#28000;ユ帴瀛?#28051;詫紝杩欎簺瀛?#28051;?#37721;?#28000;ュ彇浠?n1,n2 ?#31651;闂寸殑琛?#38171;?d 锛氬垹闄わ紝?#27932;涓烘槸鍒?#38340;ゅ晩锛屾墍浠?d ?#24727;?#28528;閫氬父涓嶆帴浠?#28003;?#37724;氬挌锛?i 锛?#37819;掑叆?#32029; i ?#27537;?#24727;?#28528;鍙?#28000;ユ帴瀛?#28051;詫紝鑰?#26473;欎簺瀛?#28051;?#28028;氬湪鏂扮殑?#31476;琛屽?#34425;幇(鐩?#37715;嶇殑涓婁竴琛?锛?p 锛氬垪鍗帮紝浜?#37719;?#28751;?#37836;?#28051;?#38315;?#37815;╃殑鏁版嵁鍗板嚭銆?#38315;氬父 p 浼?#28051;庡弬鏁?</span><span style="margin: 0px; padding: 0px; color: #0000ff; line-height: 1.5 !important;">sed</span> -<span style="margin: 0px; padding: 0px; line-height: 1.5 !important;">n ?#31476;璧?#26473;?#29723;岋綖 s 锛氬彇浠o紝鍙?#28000;?#37929;存帴?#32344;琛屽彇浠g殑宸?#28003;?#37725;?#38171;?#38315;氬父杩?#28051;?s ?#27537;鍔?#28003;?#37721;?#28000;ユ惌?#21412;姝?#29785;?#29723;?#32448;烘硶锛佷?#23338; </span><span style="margin: 0px; padding: 0px; color: #800080; line-height: 1.5 !important;">1</span>,20s/old/new/g 灏辨槸鍟?#38171;?/pre><div style="margin: 5px 0px 0px; line-height: 1.5 !important;"><span style="margin: 0px; padding: 0px 5px 0px 0px; line-height: 1.5 !important;"><a title="澶嶅埗浠?#37934;? style="margin: 0px; padding: 0px; color: #444444; text-decoration: underline; border: none !important;"><img src="https://common.cnblogs.com/images/copycode.gif" alt="澶嶅埗浠?#37934;? style="margin: 0px; padding: 0px; max-width: 660px; height: auto; border: none !important;" /></a></span></div></div><p style="margin-top: 10px; margin-bottom: 10px; padding: 0px; line-height: 18px; color: #444444; font-family: tahoma, arial, sans-serif; font-size: 12px; background-color: #ffffff;"><br style="margin: 0px; padding: 0px;" /><strong style="margin: 0px; padding: 0px;">sed -i</strong> 灏辨槸鐩存帴瀵?#37826;?#37832;?#37826;?#28000;惰繘琛屾搷浣滅殑</p><div style="margin: 5px 0px; font-size: 12px; line-height: 18px;"><pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; white-space: pre-wrap; word-wrap: break-word; font-family: 'Courier New' !important;"><span style="margin: 0px; padding: 0px; color: #0000ff; line-height: 1.5 !important;">sed</span> -i <span style="margin: 0px; padding: 0px; color: #800000; line-height: 1.5 !important;">'</span><span style="margin: 0px; padding: 0px; color: #800000; line-height: 1.5 !important;">s/鍘?#28699;楃涓?鏂?#28699;楃涓?</span><span style="margin: 0px; padding: 0px; color: #800000; line-height: 1.5 !important;">'</span> /home/<span style="margin: 0px; padding: 0px; color: #800080; line-height: 1.5 !important;">1</span><span style="margin: 0px; padding: 0px; line-height: 1.5 !important;">.txt </span><span style="margin: 0px; padding: 0px; color: #0000ff; line-height: 1.5 !important;">sed</span> -i <span style="margin: 0px; padding: 0px; color: #800000; line-height: 1.5 !important;">'</span><span style="margin: 0px; padding: 0px; color: #800000; line-height: 1.5 !important;">s/鍘?#28699;楃涓?鏂?#28699;楃涓?g</span><span style="margin: 0px; padding: 0px; color: #800000; line-height: 1.5 !important;">'</span> /home/<span style="margin: 0px; padding: 0px; color: #800080; line-height: 1.5 !important;">1</span>.txt</pre></div><p style="margin-top: 10px; margin-bottom: 10px; padding: 0px; line-height: 18px; color: #444444; font-family: tahoma, arial, sans-serif; font-size: 12px; background-color: #ffffff;"><br style="margin: 0px; padding: 0px;" />杩?#28051;?#37833;?#37723;?#28000;ょ殑?#23599;鍒?#28751;辨槸?#32029;鐪嬬?#36720;?#23338;惂</p><p style="margin-top: 10px; margin-bottom: 10px; padding: 0px; line-height: 18px; color: #444444; font-family: tahoma, arial, sans-serif; font-size: 12px; background-color: #ffffff;">杩欐槸1.txt?#27537;鍐呭</p><div style="margin: 5px 0px; font-size: 12px; line-height: 18px;"><pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; white-space: pre-wrap; word-wrap: break-word; font-family: 'Courier New' !important;"><span style="margin: 0px; padding: 0px; color: #800080; line-height: 1.5 !important;">#<span style="margin: 0px; padding: 0px; color: #0000ff; line-height: 1.5 !important;">cat</span> 1</span><span style="margin: 0px; padding: 0px; line-height: 1.5 !important;">.txt d ddd #ff</span></pre></div><p style="margin-top: 10px; margin-bottom: 10px; padding: 0px; line-height: 18px; color: #444444; font-family: tahoma, arial, sans-serif; font-size: 12px; background-color: #ffffff;">鍐?#37930;?#37813;?#29723;?#26473;?#28051;?#37833;?#37723;?#28000;ょ殑?#23599;鍒?#37722;?/p><div style="margin: 5px 0px; font-size: 12px; line-height: 18px;"><div style="margin: 5px 0px 0px; line-height: 1.5 !important;"><span style="margin: 0px; padding: 0px 5px 0px 0px; line-height: 1.5 !important;"><a title="澶嶅埗浠?#37934;? style="margin: 0px; padding: 0px; color: #444444; text-decoration: underline; border: none !important;"><img src="https://common.cnblogs.com/images/copycode.gif" alt="澶嶅埗浠?#37934;? style="margin: 0px; padding: 0px; max-width: 660px; height: auto; border: none !important;" /></a></span></div><pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; white-space: pre-wrap; word-wrap: break-word; font-family: 'Courier New' !important;"><span style="margin: 0px; padding: 0px; color: #0000ff; line-height: 1.5 !important;">sed</span> -i <span style="margin: 0px; padding: 0px; color: #800000; line-height: 1.5 !important;">'</span><span style="margin: 0px; padding: 0px; color: #800000; line-height: 1.5 !important;">s/d/7523/</span><span style="margin: 0px; padding: 0px; color: #800000; line-height: 1.5 !important;">'</span> /home/<span style="margin: 0px; padding: 0px; color: #800080; line-height: 1.5 !important;">1</span><span style="margin: 0px; padding: 0px; line-height: 1.5 !important;">.txt 鎵?#29723;?#32513;撴灉 </span><span style="margin: 0px; padding: 0px; color: #800080; line-height: 1.5 !important;">7523</span><span style="margin: 0px; padding: 0px; line-height: 1.5 !important;"> 7523</span><span style="margin: 0px; padding: 0px; color: #0000ff; line-height: 1.5 !important;">dd</span><span style="margin: 0px; padding: 0px; line-height: 1.5 !important;"> #ff </span><span style="margin: 0px; padding: 0px; color: #0000ff; line-height: 1.5 !important;">sed</span> -i <span style="margin: 0px; padding: 0px; color: #800000; line-height: 1.5 !important;">'</span><span style="margin: 0px; padding: 0px; color: #800000; line-height: 1.5 !important;">s/d/7523/g</span><span style="margin: 0px; padding: 0px; color: #800000; line-height: 1.5 !important;">'</span> /home/<span style="margin: 0px; padding: 0px; color: #800080; line-height: 1.5 !important;">1</span><span style="margin: 0px; padding: 0px; line-height: 1.5 !important;">.txt 鎵?#29723;?#32513;撴灉 </span><span style="margin: 0px; padding: 0px; color: #800080; line-height: 1.5 !important;">7523</span> <span style="margin: 0px; padding: 0px; color: #800080; line-height: 1.5 !important;">752375237523</span><span style="margin: 0px; padding: 0px; line-height: 1.5 !important;"> #ff</span></pre><div style="margin: 5px 0px 0px; line-height: 1.5 !important;"><span style="margin: 0px; padding: 0px 5px 0px 0px; line-height: 1.5 !important;"><a title="澶嶅埗浠?#37934;? style="margin: 0px; padding: 0px; color: #444444; text-decoration: underline; border: none !important;"><img src="https://common.cnblogs.com/images/copycode.gif" alt="澶嶅埗浠?#37934;? style="margin: 0px; padding: 0px; max-width: 660px; height: auto; border: none !important;" /></a></span></div></div><p style="margin-top: 10px; margin-bottom: 10px; padding: 0px; line-height: 18px; color: #444444; font-family: tahoma, arial, sans-serif; font-size: 12px; background-color: #ffffff;"> </p><p style="margin-top: 10px; margin-bottom: 10px; padding: 0px; line-height: 18px; color: #444444; font-family: tahoma, arial, sans-serif; font-size: 12px; background-color: #ffffff;"><strong style="margin: 0px; padding: 0px;">鍘绘帀 “琛岄” 甯?#8220;@”?#27537;棣栧?#26945;瘝@</strong></p><div style="margin: 5px 0px; font-size: 12px; line-height: 18px;"><pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; white-space: pre-wrap; word-wrap: break-word; font-family: 'Courier New' !important;"><span style="margin: 0px; padding: 0px; color: #0000ff; line-height: 1.5 !important;">sed</span> -i <span style="margin: 0px; padding: 0px; color: #800000; line-height: 1.5 !important;">'</span><span style="margin: 0px; padding: 0px; color: #800000; line-height: 1.5 !important;">s/^@//</span><span style="margin: 0px; padding: 0px; color: #800000; line-height: 1.5 !important;">'</span> <span style="margin: 0px; padding: 0px; color: #0000ff; line-height: 1.5 !important;">file</span></pre></div><p style="margin-top: 10px; margin-bottom: 10px; padding: 0px; line-height: 18px; color: #444444; font-family: tahoma, arial, sans-serif; font-size: 12px; background-color: #ffffff;"> </p><p style="margin-top: 10px; margin-bottom: 10px; padding: 0px; line-height: 18px; color: #444444; font-family: tahoma, arial, sans-serif; font-size: 12px; background-color: #ffffff;"><strong style="margin: 0px; padding: 0px;">鐗?#28729;氬?#26947;涓茬殑琛屽墠鎻掑叆鏂?#29723;?/strong></p><div style="margin: 5px 0px; font-size: 12px; line-height: 18px;"><pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; white-space: pre-wrap; word-wrap: break-word; font-family: 'Courier New' !important;"><span style="margin: 0px; padding: 0px; color: #0000ff; line-height: 1.5 !important;">sed</span> -i <span style="margin: 0px; padding: 0px; color: #800000; line-height: 1.5 !important;">'</span><span style="margin: 0px; padding: 0px; color: #800000; line-height: 1.5 !important;">/鐗?#28729;氬?#26947;涓?i 鏂?#29723;?#28699;楃涓?/span><span style="margin: 0px; padding: 0px; color: #800000; line-height: 1.5 !important;">' <span style="margin: 0px; padding: 0px; color: #0000ff; line-height: 1.5 !important;">file</span></span></pre></div><p style="margin-top: 10px; margin-bottom: 10px; padding: 0px; line-height: 18px; color: #444444; font-family: tahoma, arial, sans-serif; font-size: 12px; background-color: #ffffff;"> </p><p style="margin-top: 10px; margin-bottom: 10px; padding: 0px; line-height: 18px; color: #444444; font-family: tahoma, arial, sans-serif; font-size: 12px; background-color: #ffffff;"><strong style="margin: 0px; padding: 0px;">鐗?#28729;氬?#26947;涓茬殑琛屽悗鎻掑叆鏂?#29723;?/strong></p><div style="margin: 5px 0px; font-size: 12px; line-height: 18px;"><pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; white-space: pre-wrap; word-wrap: break-word; font-family: 'Courier New' !important;"><span style="margin: 0px; padding: 0px; color: #0000ff; line-height: 1.5 !important;">sed</span> -i <span style="margin: 0px; padding: 0px; color: #800000; line-height: 1.5 !important;">'</span><span style="margin: 0px; padding: 0px; color: #800000; line-height: 1.5 !important;">/鐗?#28729;氬?#26947;涓?a 鏂?#29723;?#28699;楃涓?/span><span style="margin: 0px; padding: 0px; color: #800000; line-height: 1.5 !important;">'</span> <span style="margin: 0px; padding: 0px; color: #0000ff; line-height: 1.5 !important;">file</span></pre></div><p style="margin-top: 10px; margin-bottom: 10px; padding: 0px; line-height: 18px; color: #444444; font-family: tahoma, arial, sans-serif; font-size: 12px; background-color: #ffffff;"> </p><p style="margin-top: 10px; margin-bottom: 10px; padding: 0px; line-height: 18px; color: #444444; font-family: tahoma, arial, sans-serif; font-size: 12px; background-color: #ffffff;"><strong style="margin: 0px; padding: 0px;">鐗?#28729;氬?#26947;涓茬殑鍒?#38340;?/strong></p><div style="margin: 5px 0px; font-size: 12px; line-height: 18px;"><pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; white-space: pre-wrap; word-wrap: break-word; font-family: 'Courier New' !important;"><span style="margin: 0px; padding: 0px; color: #0000ff; line-height: 1.5 !important;">sed</span> -i <span style="margin: 0px; padding: 0px; color: #800000; line-height: 1.5 !important;">'</span><span style="margin: 0px; padding: 0px; color: #800000; line-height: 1.5 !important;">/瀛楃涓?d</span><span style="margin: 0px; padding: 0px; color: #800000; line-height: 1.5 !important;">' </span><span style="margin: 0px; padding: 0px; color: #0000ff; line-height: 1.5 !important;">file</span></pre></div><p style="margin-top: 10px; margin-bottom: 10px; padding: 0px; line-height: 18px; color: #444444; font-family: tahoma, arial, sans-serif; font-size: 12px; background-color: #ffffff;"> </p></div><img src ="http://www.2676208.com/prayer/aggbug/216337.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.2676208.com/prayer/" target="_blank">Prayer</a> 2019-04-04 17:49 <a href="http://www.2676208.com/prayer/archive/2019/04/04/216337.html#Feedback" target="_blank" style="text-decoration:none;">鍙?#29723;?#29831;?#29825;?/a></div>]]></description></item><item><title>sed?#33105;浣?#37922;?#37721;?#38322;?#37831;?#37817;?#28000;?#37721;?#37813;?#29723;?#28598;?#38318;?#37723;?#28000;?/title><link>http://www.2676208.com/prayer/archive/2019/04/04/216336.html</link><dc:creator>Prayer</dc:creator><author>Prayer</author><pubDate>Thu, 04 Apr 2019 09:46:00 GMT</pubDate><guid>http://www.2676208.com/prayer/archive/2019/04/04/216336.html</guid><wfw:comment>http://www.2676208.com/prayer/comments/216336.html</wfw:comment><comments>http://www.2676208.com/prayer/archive/2019/04/04/216336.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.2676208.com/prayer/comments/commentRss/216336.html</wfw:commentRss><trackback:ping>http://www.2676208.com/prayer/services/trackbacks/216336.html</trackback:ping><description><![CDATA[<div>https://blog.csdn.net/halazi100/article/details/41722021<br /><br /><p style="box-sizing: border-box; outline: 0px; margin: 0px 0px 16px; padding: 0px; font-family: 'Microsoft YaHei', 'SF Pro Display', Roboto, Noto, Arial, 'PingFang SC', sans-serif; font-size: 16px; color: #4f4f4f; line-height: 26px; overflow-x: auto; word-wrap: break-word; background-color: #ffffff;">鍦?#28003;?#37922;╯ed瀵?#37827;?#36423;?#37812;?#38000;呭?#36346;畠鏂?#37832;繘琛宲arse?#27537;杩?#32459;嬪綋?#33105;锛屾?#22795;椂鍊?#37812;?#28000;渶瑕?#23534;?#37922;?#28598;?#38318;?#37721;?#38322;忕殑鍊硷紝<br style="box-sizing: border-box; outline: 0px; margin: 0px; padding: 0px; word-wrap: break-word;" /> <br style="box-sizing: border-box; outline: 0px; margin: 0px; padding: 0px; word-wrap: break-word;" />鎴?#38000;呰?#23792;彇?#31476;涓猻hell鍛?#28000;?#37813;?#29723;岀殑缁撴灉?#32029;浠?#28186;?#26440;?#37714;版洿鍔?#37721;?#29785;傜殑杈撳嚭缁撴灉銆?#26473;?#38322;?#28000;?#32513;嶅?#20633;綍鍋氬埌銆?br style="box-sizing: border-box; outline: 0px; margin: 0px; padding: 0px; word-wrap: break-word;" /> <br style="box-sizing: border-box; outline: 0px; margin: 0px; padding: 0px; word-wrap: break-word;" />sed?#33105;浣?#37922;?#37721;?#38322;?#37831;?#37817;?br style="box-sizing: border-box; outline: 0px; margin: 0px; padding: 0px; word-wrap: break-word;" /> <br style="box-sizing: border-box; outline: 0px; margin: 0px; padding: 0px; word-wrap: break-word;" />1.sed鍛?#28000;?#28003;?#37922;?#37721;?#23534;?#37721;风殑鎯?#37712;?#28051;嬶紝浣?#37922;?var鐩存帴寮?#37922;?br style="box-sizing: border-box; outline: 0px; margin: 0px; padding: 0px; word-wrap: break-word;" /> <br style="box-sizing: border-box; outline: 0px; margin: 0px; padding: 0px; word-wrap: break-word;" />$ echo|sed "s/^/$RANDOM.rmvb_/g"<br style="box-sizing: border-box; outline: 0px; margin: 0px; padding: 0px; word-wrap: break-word;" /> 29328.rmvb_</p><p style="box-sizing: border-box; outline: 0px; margin: 0px 0px 16px; padding: 0px; font-family: 'Microsoft YaHei', 'SF Pro Display', Roboto, Noto, Arial, 'PingFang SC', sans-serif; font-size: 16px; color: #4f4f4f; line-height: 26px; overflow-x: auto; word-wrap: break-word; background-color: #ffffff;">濡傛灉鏇?#37817;㈢殑鍙?#38322;?#37712;呭?#36891;腑?#24776;鏈?绗?#37721;?#37714;?#28028;?#37819;?#32448;?#28641;?#28051;嬮敊璇紝濡?br style="box-sizing: border-box; outline: 0px; margin: 0px; padding: 0px; word-wrap: break-word;" />鏌?#37813;?#35120;撳墠鐩綍涓嬬殑鐩綍鏂?#28000;跺苟灏?#37929;?#28725;硅矾寰勬浛鎹?#28051;?#32513;?#28725;硅矾寰?br style="box-sizing: border-box; outline: 0px; margin: 0px; padding: 0px; word-wrap: break-word;" />find . -type f | sed -n "s/\./$PWD/p"<br style="box-sizing: border-box; outline: 0px; margin: 0px; padding: 0px; word-wrap: break-word;" />sed: -e expression #1, char 19: unknown option to `s'<br style="box-sizing: border-box; outline: 0px; margin: 0px; padding: 0px; word-wrap: break-word;" />?#31904;璇硶涓婄湅锛屾病鏈?#28000;?#28003;曢棶棰?#38171;?#28003;?#37922;变簬鍙?#38322;忎腑鍖呭惈鏈?#8220;/”浣?#28051;?#37714;嗛?#26050;?#32029;杩?#28028;氬拰sed?#27537;鏇?#37817;㈡搷浣滅殑鍒嗛?#26050;“/”寮曡?#38155;?#38155;穯锛?#37813;浠ワ紝鍙?#29781;?#28051;?#28003;?#37922;?#8220;/”鍋氬?#21979;?#26050;灏?#37721;?#28000;?#29785;?#37712;?#26473;?#28051;棶棰橈紝濡傛灉浣?#37922;?#8220;%”鑰?#28051;嶆槸“/”鏉?#28003;?#28051;簊ed?#27537;鏇?#37817;㈡搷浣滅殑鍒嗛?#26050;?#32029;灏?#28051;?#28028;氬嚭閿?#37510;傚?#36346;疄浣?#37922;?鎴?鎴?浣?#28051;?#37714;嗛?#26050;涔熸槸鍙?#28000;ョ殑?#32029;鍙?#29781;?#28051;?#28028;?#28051;?#37831;?#37817;腑鏈?#37929;?#37722;岀殑鑰?#28051;?#28051;嶆槸鍏?#28699;楃?#27537;鐗规?#23108;鍙烽兘?#27128;鍙?#28000;ョ殑锛?#28003;?#37922;ㄦ椂鍙?#28000;?#37837;规嵁鎯?#37712;电伒娲?#38315;?#37815;?#37510;?br style="box-sizing: border-box; outline: 0px; margin: 0px; padding: 0px; word-wrap: break-word;" />find . -type f | sed -n "s%\.%$PWD%p"<br style="box-sizing: border-box; outline: 0px; margin: 0px; padding: 0px; word-wrap: break-word;" />find . -type f | sed -n "s#\.#$PWD#p"</p><p style="box-sizing: border-box; outline: 0px; margin: 0px 0px 16px; padding: 0px; font-family: 'Microsoft YaHei', 'SF Pro Display', Roboto, Noto, Arial, 'PingFang SC', sans-serif; font-size: 16px; color: #4f4f4f; line-height: 26px; overflow-x: auto; word-wrap: break-word; background-color: #ffffff;"># 涓婇潰渚?#28699;?#23534;?#37922;ㄤ簡?#31476;涓?#37916;?#28583;?#37721;?#38322;?RANDOM?#27537;鍊?br style="box-sizing: border-box; outline: 0px; margin: 0px; padding: 0px; word-wrap: break-word;" /> <br style="box-sizing: border-box; outline: 0px; margin: 0px; padding: 0px; word-wrap: break-word;" />2.sed鍛?#28000;?#28003;?#37922;?#37719;?#23534;?#37721;风殑鎯?#37712;?#28051;嬶紝浣?#37922;?"$var"'寮?#37922;?br style="box-sizing: border-box; outline: 0px; margin: 0px; padding: 0px; word-wrap: break-word;" /> <br style="box-sizing: border-box; outline: 0px; margin: 0px; padding: 0px; word-wrap: break-word;" />?#34987;浼?#38171;屾垜浠?#37721;?#28000;?#37930;嬪埌<br style="box-sizing: border-box; outline: 0px; margin: 0px; padding: 0px; word-wrap: break-word;" /> <br style="box-sizing: border-box; outline: 0px; margin: 0px; padding: 0px; word-wrap: break-word;" />$ echo|sed 's/^/'"$RANDOM"'.rmvb_/g'<br style="box-sizing: border-box; outline: 0px; margin: 0px; padding: 0px; word-wrap: break-word;" /> 31338.rmvb_<br style="box-sizing: border-box; outline: 0px; margin: 0px; padding: 0px; word-wrap: break-word;" /> <br style="box-sizing: border-box; outline: 0px; margin: 0px; padding: 0px; word-wrap: break-word;" />sed?#33105;鎵?#29723;?#28598;?#38318;?#37723;?#28000;?br style="box-sizing: border-box; outline: 0px; margin: 0px; padding: 0px; word-wrap: break-word;" /> <br style="box-sizing: border-box; outline: 0px; margin: 0px; padding: 0px; word-wrap: break-word;" />1.sed鍛?#28000;?#28003;?#37922;?#37719;?#23534;?#37721;风殑鎯?#37712;?#28051;?#28003;?#37922;?`shell command`'鎴?#38000;?$(shell command)'寮?#37922;?#37723;?#28000;?#37813;?#29723;岀殑缁撴灉<br style="box-sizing: border-box; outline: 0px; margin: 0px; padding: 0px; word-wrap: break-word;" /> <br style="box-sizing: border-box; outline: 0px; margin: 0px; padding: 0px; word-wrap: break-word;" />杩樻槸浠?#28051;婇潰妗?#28186;嬪垎鏋愶紝渚?#28699;?#28641;?#28051;?br style="box-sizing: border-box; outline: 0px; margin: 0px; padding: 0px; word-wrap: break-word;" /> <br style="box-sizing: border-box; outline: 0px; margin: 0px; padding: 0px; word-wrap: break-word;" />$ echo|sed 's/^/'`echo $RANDOM`'.rmvb_/g'<br style="box-sizing: border-box; outline: 0px; margin: 0px; padding: 0px; word-wrap: break-word;" /> 8063.rmvb_<br style="box-sizing: border-box; outline: 0px; margin: 0px; padding: 0px; word-wrap: break-word;" /> </p><p style="box-sizing: border-box; outline: 0px; margin: 0px 0px 16px; padding: 0px; font-family: 'Microsoft YaHei', 'SF Pro Display', Roboto, Noto, Arial, 'PingFang SC', sans-serif; font-size: 16px; color: #4f4f4f; line-height: 26px; overflow-x: auto; word-wrap: break-word; background-color: #ffffff;"># 涓婇潰?#27537;渚?#28699;?#28003;?#37922;ㄤ簡鏃?#23534;忕殑鍛?#28000;?#37831;?#37817;紝涔?#37721;?#28000;?#38322;?#37922;?#37826;?#23534;忕殑鍛?#28000;?#37831;?#37817;?#37826;规硶?#32029;濡?#28051;?br style="box-sizing: border-box; outline: 0px; margin: 0px; padding: 0px; word-wrap: break-word;" /> <br style="box-sizing: border-box; outline: 0px; margin: 0px; padding: 0px; word-wrap: break-word;" />$ echo|sed 's/^/'$(echo $RANDOM)'.rmvb_/g'<br style="box-sizing: border-box; outline: 0px; margin: 0px; padding: 0px; word-wrap: break-word;" /> 18554.rmvb_<br style="box-sizing: border-box; outline: 0px; margin: 0px; padding: 0px; word-wrap: break-word;" /> </p><p style="box-sizing: border-box; outline: 0px; margin: 0px 0px 16px; padding: 0px; font-family: 'Microsoft YaHei', 'SF Pro Display', Roboto, Noto, Arial, 'PingFang SC', sans-serif; font-size: 16px; color: #4f4f4f; line-height: 26px; overflow-x: auto; word-wrap: break-word; background-color: #ffffff;"># 涓嬮潰渚?#28699;愬彇鐢?#35120;撳墠鏃?#37832;?#28003;?#28051;?#32513;撴灉?#27537;?#31476;閮?#37714;嗭紝濡?#28051;?br style="box-sizing: border-box; outline: 0px; margin: 0px; padding: 0px; word-wrap: break-word;" /> <br style="box-sizing: border-box; outline: 0px; margin: 0px; padding: 0px; word-wrap: break-word;" />$ echo|sed 's/^/'$(date +"%Y%m%d")'.rmvb_/g'<br style="box-sizing: border-box; outline: 0px; margin: 0px; padding: 0px; word-wrap: break-word;" /> 20120108.rmvb_<br style="box-sizing: border-box; outline: 0px; margin: 0px; padding: 0px; word-wrap: break-word;" /> </p><p style="box-sizing: border-box; outline: 0px; margin: 0px 0px 16px; padding: 0px; font-family: 'Microsoft YaHei', 'SF Pro Display', Roboto, Noto, Arial, 'PingFang SC', sans-serif; font-size: 16px; color: #4f4f4f; line-height: 26px; overflow-x: auto; word-wrap: break-word; background-color: #ffffff;">2.sed鍛?#28000;?#28003;?#37922;?#37721;?#23534;?#37721;风殑鎯?#37712;?#28051;?#37929;存帴`shell command`鎴?#38000;?(shell command)寮?#37922;?#37723;?#28000;?#37813;?#29723;岀殑缁撴灉<br style="box-sizing: border-box; outline: 0px; margin: 0px; padding: 0px; word-wrap: break-word;" /> </p><p style="box-sizing: border-box; outline: 0px; margin: 0px 0px 16px; padding: 0px; font-family: 'Microsoft YaHei', 'SF Pro Display', Roboto, Noto, Arial, 'PingFang SC', sans-serif; font-size: 16px; color: #4f4f4f; line-height: 26px; overflow-x: auto; word-wrap: break-word; background-color: #ffffff;">?#34987;浼肩殑?#32029;鍙?#23534;?#37721;风殑鎯?#37712;碉紝濡?#28051;?br style="box-sizing: border-box; outline: 0px; margin: 0px; padding: 0px; word-wrap: break-word;" /> <br style="box-sizing: border-box; outline: 0px; margin: 0px; padding: 0px; word-wrap: break-word;" />$ echo|sed "s/^/$(date +"%Y%m%d").rmvb_/g"<br style="box-sizing: border-box; outline: 0px; margin: 0px; padding: 0px; word-wrap: break-word;" /> 20120108.rmvb_<br style="box-sizing: border-box; outline: 0px; margin: 0px; padding: 0px; word-wrap: break-word;" /> </p><p style="box-sizing: border-box; outline: 0px; margin: 0px 0px 16px; padding: 0px; font-family: 'Microsoft YaHei', 'SF Pro Display', Roboto, Noto, Arial, 'PingFang SC', sans-serif; font-size: 16px; color: #4f4f4f; line-height: 26px; overflow-x: auto; word-wrap: break-word; background-color: #ffffff;"># 浣?#37922;?#37916;?#28583;?#37721;?#38322;?RANDOM浠?#37721;?#37827;?#23534;?#37723;?#28000;?#37831;?#37817;㈢殑渚?#28699;?br style="box-sizing: border-box; outline: 0px; margin: 0px; padding: 0px; word-wrap: break-word;" /> <br style="box-sizing: border-box; outline: 0px; margin: 0px; padding: 0px; word-wrap: break-word;" />$ echo|sed "s/^/`echo $RANDOM`.rmvb_/g"<br style="box-sizing: border-box; outline: 0px; margin: 0px; padding: 0px; word-wrap: break-word;" /> 4988.rmvb_<br style="box-sizing: border-box; outline: 0px; margin: 0px; padding: 0px; word-wrap: break-word;" /> <br style="box-sizing: border-box; outline: 0px; margin: 0px; padding: 0px; word-wrap: break-word;" />鎬?#32513;?br style="box-sizing: border-box; outline: 0px; margin: 0px; padding: 0px; word-wrap: break-word;" /> <br style="box-sizing: border-box; outline: 0px; margin: 0px; padding: 0px; word-wrap: break-word;" />鍦╯ed璇?#37721;?#38322;岄潰?#32029;鍙?#38322;?#37831;?#37817;?#37812;?#38000;?#37813;?#29723;宻hell鍛?#28000;わ紝鍙?#23534;?#37721;锋瘮鍗?#23534;?#37721;峰皯缁曚竴浜?#23534;?#28699;?/p></div><img src ="http://www.2676208.com/prayer/aggbug/216336.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.2676208.com/prayer/" target="_blank">Prayer</a> 2019-04-04 17:46 <a href="http://www.2676208.com/prayer/archive/2019/04/04/216336.html#Feedback" target="_blank" style="text-decoration:none;">鍙?#29723;?#29831;?#29825;?/a></div>]]></description></item><item><title>linux ?#30254;杈?#28051;?#28051;?#37826;?#28000;?#28598;?#28051;嶅悓 (diff鍛?#28000;? md5鍒?#29723;?http://www.2676208.com/prayer/archive/2019/04/04/216335.htmlPrayerPrayerThu, 04 Apr 2019 09:46:00 GMThttp://www.2676208.com/prayer/archive/2019/04/04/216335.htmlhttp://www.2676208.com/prayer/comments/216335.htmlhttp://www.2676208.com/prayer/archive/2019/04/04/216335.html#Feedback0http://www.2676208.com/prayer/comments/commentRss/216335.htmlhttp://www.2676208.com/prayer/services/trackbacks/216335.html?#30254;杈?#37826;?#28000;?#28598;筪iff?#32029;鍙?#28000;?#37929;存帴浣?#37922;╠iff鍛?#28000;?/span>

[root@~]# diff -urNa dir1 dir2
銆銆-a Treat all files as text and compare them line-by-line, even if they do not seem to be text.
銆銆-N, --new-file
銆銆銆銆In directory comparison, if a file is found in only one directory, treat it as present but empty in the other directory.
銆銆-r When comparing directories, recursively compare any subdirectories found.

銆銆-u Use the unified output format.

 

?#30254;杈?#37826;?#28000;?#28598;筪iff?#32029;涔?#37721;?#28000;ユ瘮杈?#37826;?#28000;禡D5鍒?#29723;?#37510;?#28051;嬮潰鍛?#28000;?#37721;?#28000;?#38014;峰彇鏂?#28000;?#28598;逛腑鏂?#28000;秏d5鍒?#29723;?/strong>

find /home/ -type f -not \( -name '.*' \) -exec md5sum {} \;

璇存槑锛?1) /home/鏂?#28000;?#37929;綍

銆銆   (2) -type f 鏂?#28000;剁?#35826;瀷涓烘櫘閫?#37826;?#28000;?/p>

銆銆   (3) -not \( -name '.*' \)  杩囨护鎺夐?#24879;棌鏂?#28000;?#37510;傚彲浠?#26473;囨护鎺?#28051;嶉渶瑕?#38000;冭檻?#27537;鏂?#28000;?/p>

         (4) -exec md5sum {} \;  瀵规瘡涓?#37826;?#28000;?#37813;?#29723;宮d5sum鍛?#28000;?nbsp;

 

 鐢╰ar鍛?#28000;?#37720;?#32514;╁悗锛屾瘮杈?#37826;?#28000;剁殑MD5?#27128;涓?#29723;岀殑銆倀ar鍘?#32514;?#28028;氬甫涓?#37826;?#28000;剁殑?#26882;闂?/strong>



]]>SHELL 鍦?#37816;囧畾琛岀殑鍓??#24727;鎻掑叆鎸囧?#27692;?#21613;http://www.2676208.com/prayer/archive/2019/04/04/216334.htmlPrayerPrayerThu, 04 Apr 2019 09:13:00 GMThttp://www.2676208.com/prayer/archive/2019/04/04/216334.htmlhttp://www.2676208.com/prayer/comments/216334.htmlhttp://www.2676208.com/prayer/archive/2019/04/04/216334.html#Feedback0http://www.2676208.com/prayer/comments/commentRss/216334.htmlhttp://www.2676208.com/prayer/services/trackbacks/216334.htmlhttps://www.jianshu.com/p/66f79ad53406

濡傛灉鐭?#38316;撹?#23677;彿鍙?#28000;?#37922;?#28051;嬮潰?#27537;鏂规硶

sed -i '88 r b.file' a.file    #鍦╝.txt?#27537;绗?8琛屾彃?#21446;鏂?#28000;禸.txt awk '1;NR==88{system("cat b.file")}' a.file > a.file 

濡傛灉涓?#37933;?#38316;撹?#23677;?#20964;紝鍙?#28000;?#37922;?#23005;?#37715;?#37718;归厤

sed -i '/regex/ r b.txt' a.txt # regex?#27128;姝?#37714;?#29723;?#26440;?#23534;?/span> awk '/target/{system("cat b.file")}' a.file > c.file 

sed?#27537;瑭卞?#20635;灉涓?#37824;?#37721;樻簮鏂?#28000;讹紝鍙?#28000;?#37720;绘帀-i寮鍏筹紝淇?#37824;?#28028;氳?#25779;嚭鍒癝TDOUT

鍘?#37826;?#28000;?#38171;?/p>

[root@xiaowu shell]# cat -n file       1  aaaa      2  bbbb      3  cccc      4  dddd 

鐜?#37734;?#29781;?#37734;?#32471;?#27996;?#29723;?#37719;?#8220;bbbb”琛岀殑涓嬮潰娣诲?#29361;竴琛岋紝鍐呭涓?#8220;xiaowu”

[root@xiaowu shell]# sed '/bbbb/a\xiaowu' file  aaaa bbbb xiaowu cccc dddd 

濡傛灉瑕?#37716;?#28051;?#29723;?#8220;xiaowu”鍙?#28000;?#37922;ㄤ竴涓?#29831;?#37721;?#38171;屾敞鎰?#37922;?#8220;\n”鎹?#29723;?/p>

[root@xiaowu shell]# sed '/bbbb/a\xiaowu\nxiaowu' file  aaaa bbbb xiaowu xiaowu cccc dddd 

濡傛灉瑕?#37734;?#32471;?#27996;?#29723;?#37719;?#8220;bbbb”琛岀殑涓婃?#35826;?#29361;竴琛岋紝鍐呭涓?#8220;xiaowu”?#32029;鍙?#28000;?#37814;婂弬鏁?#8220;a”鎹?#37812;?#8220;i”

[root@xiaowu shell]# sed '/b/i\xiaowu' file  aaaa xiaowu bbbb cccc dddd 

浠?#28051;?#37826;?#28000;朵腑鍙?#37832;変竴琛?#37718;归厤?#32029;濡傛灉鏂?#28000;朵腑鏈?#28051;?#29723;屾垨鑰呭琛?#37718;归厤?#32029;缁撴灉鏈夋槸濡備綍鍛?#38171;?/p>

[root@xiaowu shell]# cat -n file       1  aaaa      2  bbbb      3  cccc      4  bbbb      5  dddd 
[root@xiaowu shell]# sed '/bbbb/a\xiaowu' file  aaaa bbbb xiaowu cccc bbbb xiaowu dddd 

鐢?#32513;撴灉鍙?#37933;?#38171;屾瘡涓?#37718;归厤琛岀殑涓嬩竴琛岄兘浼?#29722;?#23075;诲姞“xiaowu”

閭?#28052;堝?#20635;灉鎸囧悜鍦?#32471;?#27996;?#28051;?#8220;bbbb”?#27537;涓嬩竴琛屾?#35826;姞鍐呭“xiaowu”?#32029;璇?#28641;備綍?#25655;浣?#37723;?#38171;?br style="box-sizing: border-box;" />鍙?#28000;?#38000;冭檻鍏堣幏鍙栫浜?#28051;?#8220;bbbb”琛岀殑琛屽?#20964;紝鐒跺悗鏍规嵁琛屽彿鍦?#23005;?#29723;岀殑涓嬩竴琛屾?#35826;姞“xiaowu”

?#24143;鍙栫浜?#28051;?#8220;bbbb”琛岀殑琛屽?#39118;殑鏂规硶锛?br style="box-sizing: border-box;" />鏂规硶?#31476;锛?/p>

[root@xiaowu shell]# cat -n file |grep b |awk '{print $1}'|sed -n "2"p 4 

鏂规硶浜?#38171;?/p>

[root@xiaowu shell]# sed -n '/bbbb/=' file |sed -n "2"p 4 

鐢?#32513;撴灉鍙?#37933;?#32471;?#27996;?#28051;?#8220;bbbb”琛岀殑琛屽彿涓??#32029;鐒跺悗鍐?#37734;?#32471;?#37733;?#29723;岀殑鍓?#37812;栧悗娣诲姞鐩?#25652;旂殑鍐呭:

[root@xiaowu shell]# sed -e '4a\xiaowu' file  aaaa bbbb cccc bbbb xiaowu dddd 
[root@xiaowu shell]# sed -e '4a\xiaowu\nxiaowu' file  aaaa bbbb cccc bbbb xiaowu xiaowu dddd 

鍚?#37816;囧畾琛岀殑鏈?#28751;炬?#35826;?#29363;?#22247;?#27692;?#21613;锛屾瘮濡?#37734;?#8220;ccccc”琛岀殑琛?#28751;?#28000;?#32513;?#8220; eeeee”

[root@xiaowu shell]# cat file aaaaa bbbbb ccccc ddddd [root@xiaowu shell]# sed 's/cc.*/& eeeee/g' file aaaaa bbbbb ccccc eeeee ddddd 

鍘?#37826;?#38334;炬帴



]]>linux涓?#37819;?#32448;?usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.14' not found 瑙?#37712;?#37716;炴硶http://www.2676208.com/prayer/archive/2019/04/04/216333.htmlPrayerPrayerThu, 04 Apr 2019 02:15:00 GMThttp://www.2676208.com/prayer/archive/2019/04/04/216333.htmlhttp://www.2676208.com/prayer/comments/216333.htmlhttp://www.2676208.com/prayer/archive/2019/04/04/216333.html#Feedback0http://www.2676208.com/prayer/comments/commentRss/216333.htmlhttp://www.2676208.com/prayer/services/trackbacks/216333.html鍦╮hel6.6涓婂畨瑁卶t?#24727;?#32029;杩?#29723;宷tcreator鎻?#32448;?“鏍?#36423;冭?#34249;叆澶辫触: /opt/Qt5.3.2/Tools/QtCreator/lib/qtcreator/plugins/libCore.so: 鏃犳硶鍔犺浇搴?opt/Qt5.3.2/Tools/QtCreator/lib/qtcreator/plugins/libCore.so锛?/usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.14' not found (required by /opt/Qt5.3.2/Tools/QtCreator/lib/qtcreator/plugins/libCore.so))

鍦?#32515;?#28051;婃煡鎵?#29863;勬?#27407;悗?#32029;瑙?#37712;?#37826;规硶濡?#28051;?em id="__mceDel" style="margin: 0px; padding: 0px; line-height: 1.5;">銆?/em>

 

1.鏌?#37930;媑cc?#22679;鏈腑鍖呭惈鍝?#27996;?#25652;?#37510;?/p>

strings /usr/lib64/libstdc++.so.6 | grep GLIBC

GLIBCXX_3.4
GLIBCXX_3.4.1
GLIBCXX_3.4.2
GLIBCXX_3.4.3
GLIBCXX_3.4.4
GLIBCXX_3.4.5
GLIBCXX_3.4.6
GLIBCXX_3.4.7
GLIBCXX_3.4.8
GLIBCXX_3.4.9
GLIBCXX_3.4.10
GLIBCXX_3.4.11
GLIBCXX_3.4.12
GLIBCXX_3.4.13
GLIBC_2.2.5
GLIBC_2.3
GLIBC_2.4
GLIBC_2.3.2
GLIBCXX_FORCE_NEW
GLIBCXX_DEBUG_MESSAGE_LENGTH

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

銆銆鍙?#28000;?#37930;嬪嚭涓?#37718;呭惈GLIBCXX_3.4.14

2.?#31904;缃?#28051;?#28051;嬭浇?#29678;?#22679;鏈殑libstdc++.so.6.0.13浠?#28051;婄殑?#22679;鏈?#38171;屾瘮濡俵ibstdc++.so.6.0.17銆?/p>

3.?#22968;libstdc++.so.6.0.17鎷疯礉鍒?usr/lib64鐩綍涓?#37510;?/p>

銆銆cp libstdc++.so.6.0.17 /usr/lib64/

4.鍒?#38340;ibstdc++.so.6绗?#37721;?#26473;炴帴銆?/p>

銆銆rm libstdc++.so.6

5.鏂板缓閲岀鍙?#26473;炴帴銆?/p>

銆銆ln -s libstdc++.so.6.0.17 libstdc++.so.6

6.鍐?#23046;?#37836;?#37930;?#28751;辨病鏈夐棶棰樹簡銆?/p>

 

libstdc++.so.6.0.17涓嬭浇鍦?#37735;



]]>lib lib32 lib64?#29905;lib鏂?#28000;?#28598;圭殑璇存槑http://www.2676208.com/prayer/archive/2019/04/04/216332.htmlPrayerPrayerThu, 04 Apr 2019 02:14:00 GMThttp://www.2676208.com/prayer/archive/2019/04/04/216332.htmlhttp://www.2676208.com/prayer/comments/216332.htmlhttp://www.2676208.com/prayer/archive/2019/04/04/216332.html#Feedback0http://www.2676208.com/prayer/comments/commentRss/216332.htmlhttp://www.2676208.com/prayer/services/trackbacks/216332.html
  • /lib 
    ?#28214;鍩?#37832;殑鍏?#27996;?#25652;撳拰鍐?#37837;告ā鍧?#37510;?nbsp;
    鐩殑 -> ?#29928;鏀?#37922;ㄤ簬鍚?#37716;ㄧ郴缁?#37724;屾墽琛宺oot鏂?#28000;剁郴缁熺殑鍛?#28000;ょ殑濡?bin /sbin?#27537;浜岃繘鍒?#37826;?#28000;剁殑鍏?#27996;?#25652;?#38171;屾垨鑰呭瓨鏀?2浣?#38171;屾垨鑰?4浣?file鍛?#28000;?#37836;?#37930;?銆?/li>
  • /lib銆?/usr/lib銆?usr/local/lib 
    鐩殑 -> 灏辨槸涓轰簡?#23599;鍒?2浣?#37724;?4浣嶈?#29825;?#32515;殑鐩綍銆?#26473;欑鎯?#37712;?#28051;?lib鏈?#37721;?#38003;芥槸鍏剁鍙?#38334;炬帴銆?/li>
  • /usr/lib銆?usr/local/lib 
    绋?#25652;?#37724;屽畨瑁呭寘?#27537;搴撹矾寰?#37510;?nbsp;
    璇存槑 -> 涓?#28186;濊?#26667;?#29808;畾鏋?#37835;勭殑搴撳簲璇?#37824;?#37714;?usr/share?#33105;鑰?#28051;嶆槸杩?#38322;?#37510;?#25652;?#37922;?#32459;?#25652;?#37721;?#28000;?#38007;?#23480;?#37714;涘?#36720;竴涓?#37719;?#37913;殑瀛?#37929;綍?#33503;?#22968;鑷?#23480;辩殑搴?#37824;?#37734;?#37711;朵腑銆?/p>

  • 鎬?#32513;?nbsp;
    ?#31476;鑸?#37807;?#37712;?#28051;?#38171;?nbsp;
    ?#37108;缁?#38007;?#23480;?#28028;氬?#24402;厤搴?#37922;?#32459;?#25652;?#28051;?#37711;?#25652;?#29831;ヨ皟鐢ㄧ殑浣?#37825;扮殑搴?#37510;?nbsp;
    濡傛灉?#27128;鐢ㄤ簬/bin /sbin?#27537;搴?#38171;屾斁缃?#37714;?lib*?#31651;?#33105;銆?nbsp;
    濡傛灉?#27128;鐢ㄤ簬鐢?#37812;?#32459;?#25652;?#37812;栧畨瑁呭寘?#27537;锛屾斁缃?#37714;?usr/lib*鎴?usr/local/lib*?#31651;?#33105;銆?nbsp;
    濡傛灉鏌?#28051;?#25652;撳彧?#27128;鐗?#37714;殑鐢ㄤ簡鏌?#28051;?#28051;?#37922;?#32459;?#25652;忥紝鑰?#26473;?#28051;?#32459;?#25652;?#28003;嗗苟涓?#37813;撶畻鐩存帴琚?#37922;?#37812;?#37812;?#38000;卹oot?#30367;鐢紝搴?#37824;?#32515;?#37714;?usr/libexec?#33105;銆?/p>

  • http://unix.stackexchange.com/questions/74646/difference-between-lib-lib32-lib64-libx32-and-libexec



    ]]>Linux绋?#25652;?#37714;?#37835;?#23480;?#37711;?#28000;?#32513;?#37413;攍dd,nmhttp://www.2676208.com/prayer/archive/2019/04/03/216328.htmlPrayerPrayerWed, 03 Apr 2019 07:56:00 GMThttp://www.2676208.com/prayer/archive/2019/04/03/216328.htmlhttp://www.2676208.com/prayer/comments/216328.htmlhttp://www.2676208.com/prayer/archive/2019/04/03/216328.html#Feedback0http://www.2676208.com/prayer/comments/commentRss/216328.htmlhttp://www.2676208.com/prayer/services/trackbacks/216328.html

    鏈?#37826;?#29781;?#28000;?#32513;嶇殑ldd鍜宯m?#27128;linux涓嬶紝涓?#28051;?#37922;?#37833;?#37714;?#37835;?#32459;?#25652;?#23536;堝疄鐢ㄧ殑宸?#37711;?#37510;俵dd?#27128;鐢?#37833;?#37714;?#37835;?#32459;?#25652;?#26473;?#29723;屾椂?#28214;瑕佷?#28618;?#26667;殑鍔?#37804;?#25652;撶殑宸?#37711;?#38171;沶m?#27128;鐢?#37833;?#37836;?#37930;?#37816;囧畾绋?#25652;忎腑?#27537;绗?#37721;?#29723;?#37929;?#37711;?#37712;呭?#22317;殑宸?#37711;?#37510;?#28051;嬮潰閫?#26473;?#28186;?#28699;愶紝鍒?#37714;?#37833;?#28000;?#32513;嶄竴涓?#26473;?#28051;?#28051;?#23480;?#37711;?#38171;?/p>

    1. ldd, 鍏?#37930;?#28051;嬮潰?#27537;渚?#28699;? 鐢╨dd鏌?#37930;媍s绋?#25652;?#37813;渚濊?#26667;殑鍔?#37804;?#25652;?#38171;?/p>

    1. $ ldd cs  
    2. linux-gate.so.1 =>  (0xffffe000)  
    3. libz.so.1 => /lib/libz.so.1 (0xb7f8c000)  
    4. libpthread.so.0 => /lib/libpthread.so.0 (0xb7f75000)  
    5. libcrypto.so.0.9.8 => /usr/lib/libcrypto.so.0.9.8 (0xb7e4d000)  
    6. libpcre.so.0 => /usr/lib/libpcre.so.0 (0xb7e21000)  
    7. libstdc++.so.6 => /usr/local/gcc4.5.1/lib/libstdc++.so.6 (0xb7d40000)  
    8. libm.so.6 => /lib/libm.so.6 (0xb7d18000)  
    9. libgcc_s.so.1 => /usr/local/gcc4.5.1/lib/libgcc_s.so.1 (0xb7cfd000)  
    10. libc.so.6 => /lib/libc.so.6 (0xb7bbc000)  
    11. /lib/ld-linux.so.2 (0xb7fab000)  
    12. libdl.so.2 => /lib/libdl.so.2 (0xb7bb7000)  

    鍦?#28051;婇潰?#27537;渚?#28699;愪腑?#32029;ldd?#27537;缁撴灉鍙?#28000;?#37714;?#28051;?#28051;?#37714;楁潵鐪?#38171;?/p>

    •绗竴鍒?#38171;?#32459;?#25652;忛渶瑕佷?#28618;禆浠涔?#25652;?br style="font-size: 0.95em;" />•绗?#27996;屽垪: ?#37108;缁?#37819;?#28186;涚殑涓庣▼搴忛渶瑕佺殑搴?#37813;瀵?#25652;旂殑搴?br style="font-size: 0.95em;" />•绗?#28051;?#37714;?#38171;氬?#25779;?#29370;?#30028;殑寮濮?#37734;?#37735;
    閫?#26473;?#28051;婇潰?#27537;?#20426;鎭?#38171;屾垜浠?#37721;?#28000;?#23536;楀埌浠?#28051;嬪嚑涓俊鎭?#38171;?/p>

    •?#32025;1锛?閫?#26473;?#28725;规瘮绗竴鍒楀拰绗?#27996;屽垪锛屾垜浠?#37721;?#28000;?#37714;?#37835;?#32459;?#25652;忛渶瑕佷?#28618;?#26667;殑搴撳拰?#37108;缁?#28729;?#38340;?#37819;?#28186;涚殑锛屾槸?#24769;鐩?#37718;归厤
    •?#32025;2锛?閫?#26473;?#29785;?#28725;熺涓?#37714;?#38171;屾垜浠?#37721;?#28000;?#37933;?#38316;?#37734;?#35120;撳?#23943;殑搴撲腑?#27537;绗?#37721;?#37734;?#28725;?#25652;旂殑?#32344;绋嬬殑鍦?#37735;绌?#38338;翠腑?#27537;寮濮?#28003;?#32515;?br style="font-size: 0.95em;" />2. nm, 閫?#26473;?#28051;嬮潰?#27537;渚?#28699;?#38171;屾垜浠?#37833;?#28000;?#32513;峮m宸?#37711;?#38171;?/p>

    鍏?#37930;嬩竴涓?#26473;?#28051;?#32480;鍗曠殑绋?#25652;?#38171;?/p>

    1. #include "iostream"   
    2.    
    3. using namespace std;  
    4.    
    5. class Test  
    6. {  
    7. public:  
    8.     void Hello()  
    9.     {  
    10.         cout < < "Hello world!" << endl;  
    11.     }  
    12. };  
    13.    
    14. int main()  
    15. {  
    16.     Test test;  
    17.     test.Hello();  
    18. }  

    ?#24116;涓?#37833;?#38171;屾垜浠?#32514;?#29831;?#29831;?#32459;?#25652;忥紝鐒跺?#24227;湅nm?#27537;缁撴灉锛?/p>

    1. $ g++ test.cc -o test  
    2. c$ nm test  
    3. 08049f10 d _DYNAMIC  
    4. 08049ff4 d _GLOBAL_OFFSET_TABLE_  
    5. 080486f0 t _GLOBAL__I_main  
    6. 080487fc R _IO_stdin_used  
    7.          w _Jv_RegisterClasses  
    8. 080486b0 t _Z41__static_initialization_and_destruction_0ii  
    9. 0804870c W _ZN4Test5HelloEv  
    10.          U _ZNSolsEPFRSoS_E@@GLIBCXX_3.4  
    11.          U _ZNSt8ios_base4InitC1Ev@@GLIBCXX_3.4  
    12.          U _ZNSt8ios_base4InitD1Ev@@GLIBCXX_3.4  
    13. 0804a040 B _ZSt4cout@@GLIBCXX_3.4  
    14.          U _ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@@GLIBCXX_3.4  
    15. 0804a0d4 b _ZStL8__ioinit  
    16.          U _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@@GLIBCXX_3.4  
    17. 08049f00 d __CTOR_END__  
    18. 08049ef8 d __CTOR_LIST__  
    19. 08049f08 D __DTOR_END__  
    20. 08049f04 d __DTOR_LIST__  
    21. 080488c8 r __FRAME_END__  
    22. 08049f0c d __JCR_END__  
    23. 08049f0c d __JCR_LIST__  
    24. 0804a02c A __bss_start  
    25.          U __cxa_atexit@@GLIBC_2.1.3  
    26. 0804a024 D __data_start  
    27. 080487b0 t __do_global_ctors_aux  
    28. 08048610 t __do_global_dtors_aux  
    29. 0804a028 D __dso_handle  
    30.          w __gmon_start__  
    31.          U __gxx_personality_v0@@CXXABI_1.3  
    32. 080487aa T __i686.get_pc_thunk.bx  
    33. 08049ef8 d __init_array_end  
    34. 08049ef8 d __init_array_start  
    35. 08048740 T __libc_csu_fini  
    36. 08048750 T __libc_csu_init  
    37.          U __libc_start_main@@GLIBC_2.0  
    38. 0804a02c A _edata  
    39. 0804a0d8 A _end  
    40. 080487dc T _fini  
    41. 080487f8 R _fp_hw  
    42. 08048508 T _init  
    43. 080485e0 T _start  
    44. 0804a0cc b completed.7065  
    45. 0804a024 W data_start  
    46. 0804a0d0 b dtor_idx.7067  
    47. 08048670 t frame_dummy  
    48. 08048694 T main  

    涓婇潰渚挎槸test杩?#28051;?#32459;?#25652;忎腑鎵鏈夌殑绗?#37721;凤紝棣栧?#22565;渶瑕?#28000;?#32513;嶄竴涓?#28051;婇潰?#27537;鍐呭?#22317;殑鏍?#23534;?#38171;?/p>

    •绗竴鍒?#38171;氬?#25779;?#23943;鍙风殑鍦?#37735;
    •绗?#27996;屽垪锛氬?#25779;?#23943;鍙风殑绫诲瀷
    •绗?#28051;?#37714;?#38171;氬?#25779;?#23943;鍙风殑鍚嶇О
    鍦?#28051;婇潰?#27537;缁撴灉?#33105;?#32029;?#20762;_ZN4Test5HelloEv杩?#37837;风殑绗?#37721;凤紝寰?#28598;?#29831;?#38000;?#37832;嬪?#23338;彲鑳?#28028;?#29722;畠鎼炴?#26346;紝杩?#38322;?#28000;?#32513;?#28051;?#28751;忔妧宸э紝鍦╪m?#27537;?#26882;鍊欙紝鍔?#28051;?C閫?#26916;癸紝灏?#37721;?#28000;ユ妸杩欎簺闅?#28000;ヨ瘑鍒殑绗?#37721;凤紝?#27974;鎹?#37812;?#28186;夸簬鎴?#28000;?#38339;?#29831;荤殑绗?#37721;稵estHello()銆?#26473;?#28051;?#28051;?#29781;佹槸c++?#33105;?#27537;mangle鏈?#37714;?#37813;瀵?#38007;寸殑?#32029;鍔?#28051;?C灏辨槸鎸囧?#27692;?#26944;?#34425;殑绗?#37721;锋槸demangle?#31777;?#27537;銆?#29831;翠簡杩欎箞澶氾紝鍒?#25652;昻m瀵?#37812;?#28000;?#32459;?#25652;?#37832;夊暐鍏?#28003;撶殑甯?#37716;?#37723;?#38171;屾?#25123;寰?#28051;?#29781;佹湁浠?#28051;嬪嚑涓?#37826;归潰锛?br style="font-size: 0.95em;" />?#32025;1锛?#37714;?#37826;?#37816;囧畾绋?#25652;忎腑鏈夋病鏈?#28729;氫?#22795;?#22247;畾?#27537;绗?#37721;?(?#30254;杈冨父鐢ㄧ殑鏂?#23534;?#38171;歯m -C proc | grep symbol)
    ?#32025;2锛夎В鍐?#32459;?#25652;?#32514;?#29831;戞椂undefined reference?#27537;閿?#29831;紝浠?#37721;妋utiple definition?#27537;閿?#29831;?/p>

    ?#32025;3锛夋煡鐪?#37836;?#28051;?#32471;?#37721;风殑鍦?#37735;?#32029;浠?#37721;?#37734;ㄨ繘绋?#32460;?#38338;寸殑澶?#22994;備綅缃紙bss, data, text?#23599;?#32029;鍏?#28003;撳彲浠?#38315;?#26473;囩浜屽垪?#27537;绫诲瀷鏉?#37714;?#37826;?#38171;?/p>

    鏈?#37826;?#29781;?#28000;?#32513;嶇殑ldd鍜宯m?#27128;linux涓嬶紝涓?#28051;?#37922;?#37833;?#37714;?#37835;?#32459;?#25652;?#23536;堝疄鐢ㄧ殑宸?#37711;?#37510;俵dd?#27128;鐢?#37833;?#37714;?#37835;?#32459;?#25652;?#26473;?#29723;屾椂?#28214;瑕佷?#28618;?#26667;殑鍔?#37804;?#25652;撶殑宸?#37711;?#38171;沶m?#27128;鐢?#37833;?#37836;?#37930;?#37816;囧畾绋?#25652;忎腑?#27537;绗?#37721;?#29723;?#37929;?#37711;?#37712;呭?#22317;殑宸?#37711;?#37510;?#28051;嬮潰閫?#26473;?#28186;?#28699;愶紝鍒?#37714;?#37833;?#28000;?#32513;嶄竴

    鐩?#37711;虫帹?#23832;



    ]]> 探灵笔记系统攻略
    华东必须游的景点 时时彩怎么找精准客户 捕鱼大亨手机版下载 时时彩怎么破单单双双 体彩走势图综合版 时时官方开奖视频下载 江苏新时时 四川时时app下载手机版下载手机版下载手机版下载 浙江福彩12选5走势图 在线棋牌