锘??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲一区二区在线观看视频,国产精品成人播放,欧美大片91 http://www.shnenglu.com/robinchow/zh-cn Sat, 29 Nov 2025 12:17:51 GMT Sat, 29 Nov 2025 12:17:51 GMT 60 [瀵煎叆]Exceptional C++ 涔?1 http://www.shnenglu.com/robinchow/archive/2007/10/23/35026.htmlRobin Chow Robin Chow Tue, 23 Oct 2007 13:01:00 GMT http://www.shnenglu.com/robinchow/archive/2007/10/23/35026.html http://www.shnenglu.com/robinchow/comments/35026.html http://www.shnenglu.com/robinchow/archive/2007/10/23/35026.html#Feedback 0 http://www.shnenglu.com/robinchow/comments/commentRss/35026.html http://www.shnenglu.com/robinchow/services/trackbacks/35026.html 鎽樿錛?br />鏈夋晥鐨勬暟鍊鹼細iterator 鎸囧悜鐨勪綅緗湁鏁堛?/li> 鏈夋晥鐨勫鍛斤細iterator 浣跨敤鏃朵粛鐒舵湁鏁堛?/li> 鏈夋晥鐨勮寖鍥達細涓瀵?iterators 緇勬垚涓涓湁鏁堢殑鑼冨洿錛宖irst 鍦?last 涔嬪墠錛堟垨鐩哥瓑錛夛紝騫朵笖涓よ呮寚鍚戝悓涓涓猚ontainer銆?/li> 闃叉涓嶅悎娉曠殑鎿嶄綔琛屼負錛屽淇敼鍐呯疆綾誨瀷鐨勬殏鏃跺璞°?br /> 鏂囩珷鏉ユ簮:http://my.donews.com/robinchow/2007/01/10/rwyjwpstnlvfjtxeqzrupbzdkijaqyohunrq/ ]]> [瀵煎叆]Exceptional C++ 涔?2 http://www.shnenglu.com/robinchow/archive/2007/10/23/35025.htmlRobin Chow Robin Chow Tue, 23 Oct 2007 13:01:00 GMT http://www.shnenglu.com/robinchow/archive/2007/10/23/35025.html http://www.shnenglu.com/robinchow/comments/35025.html http://www.shnenglu.com/robinchow/archive/2007/10/23/35025.html#Feedback 0 http://www.shnenglu.com/robinchow/comments/commentRss/35025.html http://www.shnenglu.com/robinchow/services/trackbacks/35025.html template<class charT, class traits= char_traits class Allocator = allocator<charT> > class basic_string; 鍏朵腑 char_traits 閮ㄥ垎錛屽畠鍐沖畾浜嗗瓧絎︾殑鐩鎬簰浣滅敤鍜屾瘮杈冭繍綆楋紝濡俥q()錛堢浉絳夛級銆乶e()錛堜笉絳夛級銆乴t()錛堝皬浜庯級銆乧ompare()錛堟瘮杈冨瓧絎﹀簭鍒楋級銆乫ind()錛堟悳绱㈠瓧絎﹀簭鍒楋級銆傚洜姝ゅ彧闇閲嶅畾涔?char_traits 妯℃澘鍗沖彲鏀瑰彉 string 鐨勫瓧絎︽瘮杈冩搷浣溿?br>鏂囩珷鏉ユ簮:http://my.donews.com/robinchow/2007/01/10/cfjorztxnorsmkaafyrckgebtdmemrppxzeo/ ]]>[瀵煎叆]Exceptional C++ 涔?3 http://www.shnenglu.com/robinchow/archive/2007/10/23/35024.htmlRobin Chow Robin Chow Tue, 23 Oct 2007 13:01:00 GMT http://www.shnenglu.com/robinchow/archive/2007/10/23/35024.html http://www.shnenglu.com/robinchow/comments/35024.html http://www.shnenglu.com/robinchow/archive/2007/10/23/35024.html#Feedback 0 http://www.shnenglu.com/robinchow/comments/commentRss/35024.html http://www.shnenglu.com/robinchow/services/trackbacks/35024.html 鏂囩珷鏉ユ簮:http://my.donews.com/robinchow/2007/01/10/lhiltldtjwkukgbtacjqkosnhqibccxojgzc/ ]]>[瀵煎叆]Exceptional C++ 涔?4 http://www.shnenglu.com/robinchow/archive/2007/10/23/35023.htmlRobin Chow Robin Chow Tue, 23 Oct 2007 13:01:00 GMT http://www.shnenglu.com/robinchow/archive/2007/10/23/35023.html http://www.shnenglu.com/robinchow/comments/35023.html http://www.shnenglu.com/robinchow/archive/2007/10/23/35023.html#Feedback 0 http://www.shnenglu.com/robinchow/comments/commentRss/35023.html http://www.shnenglu.com/robinchow/services/trackbacks/35023.html 浣跨敤const&鑰屼笉鏄紶鍊兼嫹璐濄?/li> 灝介噺浣跨敤鍏堝鎿嶄綔錛岄伩鍏嶄嬌鐢ㄥ悗澧炴搷浣溿傚洜涓哄湪榪涜鍚庡鎿嶄綔鏃訛紝瀵硅薄涓嶄絾蹇呴』鑷繁閫掑錛岃屼笖榪樿榪斿洖涓涓寘鍚掑鍓嶄箣鍊肩殑涓存椂瀵硅薄銆?/li> 鏃跺埢娉ㄦ剰鍥犱負鍙傛暟杞崲鑰屼駭鐢熺殑闅愯棌鐨勪復鏃跺璞°備竴涓伩鍏嶅畠鐨勫ソ鍔炴硶灝辨槸灝藉彲鑳芥樉寮忥紙explicit錛夌殑浣跨敤鏋勯犲嚱鏁般?/li> 緇濆涓嶈榪斿洖灞閮ㄥ璞$殑寮曠敤銆?br /> 鏂囩珷鏉ユ簮:http://my.donews.com/robinchow/2007/01/10/hbvgnqjrwkhzuhmyzymicgwlniycpcvweqdr/ ]]>[瀵煎叆]Exceptional C++ 涔?5 http://www.shnenglu.com/robinchow/archive/2007/10/23/35022.htmlRobin Chow Robin Chow Tue, 23 Oct 2007 13:01:00 GMT http://www.shnenglu.com/robinchow/archive/2007/10/23/35022.html http://www.shnenglu.com/robinchow/comments/35022.html http://www.shnenglu.com/robinchow/archive/2007/10/23/35022.html#Feedback 0 http://www.shnenglu.com/robinchow/comments/commentRss/35022.html http://www.shnenglu.com/robinchow/services/trackbacks/35022.html 寮傚父瀹夊叏鏄寚浠g爜鑳藉鑷繁澶勭悊寮傚父錛屽嵆鍑虹幇寮傚父鏃朵粛鑳芥甯稿伐浣滐紱寮傚父涓珛鏄寚浠g爜灝嗘墍鏈夊紓甯擱兘杞粰璋冪敤鑰呫?/p>濡傛灉鍙渶鎹曡幏鈥?..鈥濋儴鍒嗙殑寮傚父錛屽錛?br />try {TryCode();} catch(...) {CatchCode(parms); throw;}
鍙互鏀瑰啓鎴愶細 struct Janitor{ Janitor(Parms p) : pa(p) {}; ~Janitor() {if uncaught_exception() CatchCode(pa); } Parms pa; };
鍦╰ry浠g爜涔嬪墠鍒涘緩涓涓狫anitor瀵硅薄錛屽鏋滄姏鍑哄紓甯革紝閭d箞灝嗘墽琛孋atchCode鍑芥暟銆?/p>鍙︼細寮傚父瀹夊叏闇瑕佸澶氱爺絀躲?br>鏂囩珷鏉ユ簮:http://my.donews.com/robinchow/2007/01/10/esmxouitpvwdhegigrvhvlffqxlbvsrzkdwz/
]]> [瀵煎叆]DLL(Dynamic Link Libraries)涓撻 http://www.shnenglu.com/robinchow/archive/2007/10/23/35021.htmlRobin Chow Robin Chow Tue, 23 Oct 2007 13:01:00 GMT http://www.shnenglu.com/robinchow/archive/2007/10/23/35021.html http://www.shnenglu.com/robinchow/comments/35021.html http://www.shnenglu.com/robinchow/archive/2007/10/23/35021.html#Feedback 0 http://www.shnenglu.com/robinchow/comments/commentRss/35021.html http://www.shnenglu.com/robinchow/services/trackbacks/35021.html DLL(Dynamic Link Libraries)涓撻姣旇緝澶х殑搴旂敤紼嬪簭閮界敱寰堝妯″潡緇勬垚錛岃繖浜涙ā鍧楀垎鍒畬鎴愮浉瀵圭嫭绔嬬殑鍔熻兘錛屽畠浠郊姝ゅ崗浣滄潵瀹屾垚鏁翠釜杞歡緋葷粺鐨勫伐浣溿傚彲鑳藉瓨鍦ㄤ竴浜涙ā鍧楃殑鍔熻兘杈冧負閫氱敤錛屽湪鏋勯犲叾瀹冭蔣浠剁郴緇熸椂浠嶄細琚嬌鐢ㄣ傚湪鏋勯犺蔣浠剁郴緇熸椂錛屽鏋滃皢鎵鏈夋ā鍧楃殑婧愪唬鐮侀兘闈欐佺紪璇戝埌鏁翠釜搴旂敤紼嬪簭 EXE鏂囦歡涓紝浼氫駭鐢熶竴浜涢棶棰橈細涓涓己鐐規槸澧炲姞浜嗗簲鐢ㄧ▼搴忕殑澶у皬錛屽畠浼氬崰鐢ㄦ洿澶氱殑紓佺洏絀洪棿錛岀▼搴忚繍琛屾椂涔熶細娑堣楄緝澶х殑鍐呭瓨絀洪棿錛岄犳垚緋葷粺璧勬簮鐨勬氮璐癸紱鍙︿竴涓己鐐規槸錛屽湪緙栧啓澶х殑 EXE 紼嬪簭鏃訛紝鍦ㄦ瘡嬈′慨鏀歸噸寤烘椂閮藉繀欏昏皟鏁寸紪璇戞墍鏈夋簮浠g爜錛屽鍔犱簡緙栬瘧榪囩▼鐨勫鏉傛э紝涔熶笉鍒╀簬闃舵鎬х殑鍗曞厓嫻嬭瘯銆?br />
鏂囩珷鏉ユ簮:http://my.donews.com/robinchow/2007/01/10/gyedntmqpvxuumljqmoaodnacyxpzpbfngjb/ ]]> [瀵煎叆]璇﹁Вcompile鍜宭ink http://www.shnenglu.com/robinchow/archive/2007/10/23/35020.htmlRobin Chow Robin Chow Tue, 23 Oct 2007 13:01:00 GMT http://www.shnenglu.com/robinchow/archive/2007/10/23/35020.html http://www.shnenglu.com/robinchow/comments/35020.html http://www.shnenglu.com/robinchow/archive/2007/10/23/35020.html#Feedback 0 http://www.shnenglu.com/robinchow/comments/commentRss/35020.html http://www.shnenglu.com/robinchow/services/trackbacks/35020.html 璇﹁Вcompile鍜宭ink璇﹁Вcompile 錛?link 鏈変簺浜哄啓C/C++(浠ヤ笅鍋囧畾涓篊++)紼嬪簭錛屽unresolved external link鎴栬卍uplicated external simbol鐨勯敊璇俊鎭笉鐭ユ墍鎺紙鍥犱負榪欐牱鐨勯敊璇俊鎭笉鑳藉畾浣嶅埌鏌愪竴琛岋級銆傛垨鑰呭璇█鐨勪竴浜涢儴鍒嗕笉鐭ラ亾涓轟粈涔堣錛堟垨鑰呬笉瑕侊級榪欐牱閭f牱璁捐銆備簡瑙f湰鏂囦箣鍚庯紝鎴栬浼氭湁涓浜涚瓟妗堛?br />
Francis Arcanum 2007-01-05 16:03
technorati tags:C++
鏂囩珷鏉ユ簮:http://my.donews.com/robinchow/2007/01/10/lreejbbjfzmyhwqrdgmnsxfrdnejscnetrid/ ]]> [瀵煎叆]UNICODE 浠嬬粛 http://www.shnenglu.com/robinchow/archive/2007/10/23/35019.htmlRobin Chow Robin Chow Tue, 23 Oct 2007 13:01:00 GMT http://www.shnenglu.com/robinchow/archive/2007/10/23/35019.html http://www.shnenglu.com/robinchow/comments/35019.html http://www.shnenglu.com/robinchow/archive/2007/10/23/35019.html#Feedback 0 http://www.shnenglu.com/robinchow/comments/commentRss/35019.html http://www.shnenglu.com/robinchow/services/trackbacks/35019.html UNICODE 浠嬬粛 鍐呭綃囧箙杈冮暱,璇風偣鍑?a href="http://www.shnenglu.com/sunraiing9/archive/2007/01/05/17306.html">榪欓噷闃呰鍏ㄦ枃銆?img src="http://www.shnenglu.com/sunraiing9/aggbug/17306.html" height="1" width="1" />
鐜嬩竴浼?2007-01-05 13:18
鏂囩珷鏉ユ簮:http://my.donews.com/robinchow/2007/01/10/hpjgzaypfnngnyhndzdahfirtdoujqtqfdxf/ ]]> [瀵煎叆]璺熸垜涓璧峰啓 Makefile http://www.shnenglu.com/robinchow/archive/2007/10/23/35018.htmlRobin Chow Robin Chow Tue, 23 Oct 2007 13:01:00 GMT http://www.shnenglu.com/robinchow/archive/2007/10/23/35018.html http://www.shnenglu.com/robinchow/comments/35018.html http://www.shnenglu.com/robinchow/archive/2007/10/23/35018.html#Feedback 0 http://www.shnenglu.com/robinchow/comments/commentRss/35018.html http://www.shnenglu.com/robinchow/services/trackbacks/35018.html 姒傝堪 鈥斺?/strong>
浠 涔堟槸makefile錛熸垨璁稿緢澶歐inodws鐨勭▼搴忓憳閮戒笉鐭ラ亾榪欎釜涓滆タ錛屽洜涓洪偅浜沇indows鐨処DE閮戒負浣犲仛浜嗚繖涓伐浣滐紝浣嗘垜瑙夊緱瑕佷綔涓涓ソ鐨勫拰 professional鐨勭▼搴忓憳錛宮akefile榪樻槸瑕佹噦銆傝繖灝卞ソ鍍忕幇鍦ㄦ湁榪欎箞澶氱殑HTML鐨勭紪杈戝櫒錛屼絾濡傛灉浣犳兂鎴愪負涓涓笓涓氫漢澹紝浣犺繕鏄浜嗚В HTML鐨勬爣璇嗙殑鍚箟銆傜壒鍒湪Unix涓嬬殑杞歡緙栬瘧錛屼綘灝變笉鑳戒笉鑷繁鍐檓akefile浜嗭紝浼氫笉浼氬啓makefile錛屼粠涓涓晶闈㈣鏄庝簡涓涓漢鏄惁鍏峰瀹?鎴愬ぇ鍨嬪伐紼嬬殑鑳藉姏銆?/font>
鍥犱負錛宮akefile鍏崇郴鍒頒簡鏁翠釜宸ョ▼鐨勭紪璇戣 鍒欍備竴涓伐紼嬩腑鐨勬簮鏂囦歡涓嶈鏁幫紝鍏舵寜綾誨瀷銆佸姛鑳姐佹ā鍧楀垎鍒斁鍦ㄨ嫢騫蹭釜鐩綍涓紝makefile瀹氫箟浜嗕竴緋誨垪鐨勮鍒欐潵鎸囧畾錛屽摢浜涙枃浠墮渶瑕佸厛緙栬瘧錛屽摢浜涙枃浠墮渶 瑕佸悗緙栬瘧錛屽摢浜涙枃浠墮渶瑕侀噸鏂扮紪璇戯紝鐢氳嚦浜庤繘琛屾洿澶嶆潅鐨勫姛鑳芥搷浣滐紝鍥犱負makefile灝卞儚涓涓猄hell鑴氭湰涓鏍鳳紝鍏朵腑涔熷彲浠ユ墽琛屾搷浣滅郴緇熺殑鍛戒護銆?/font>
makefile 甯︽潵鐨勫ソ澶勫氨鏄斺斺滆嚜鍔ㄥ寲緙栬瘧鈥濓紝涓鏃﹀啓濂斤紝鍙渶瑕佷竴涓猰ake鍛戒護錛屾暣涓伐紼嬪畬鍏ㄨ嚜鍔ㄧ紪璇戯紝鏋佸ぇ鐨勬彁楂樹簡杞歡寮鍙戠殑鏁堢巼銆俶ake鏄竴涓懡浠ゅ伐鍏鳳紝鏄?涓涓В閲妋akefile涓寚浠ょ殑鍛戒護宸ュ叿錛屼竴鑸潵璇達紝澶у鏁扮殑IDE閮芥湁榪欎釜鍛戒護錛屾瘮濡傦細Delphi鐨刴ake錛孷isual C++鐨刵make錛孡inux涓婫NU鐨刴ake銆傚彲瑙侊紝makefile閮芥垚涓轟簡涓縐嶅湪宸ョ▼鏂歸潰鐨勭紪璇戞柟娉曘?/font>
鐜?鍦ㄨ榪板浣曞啓makefile鐨勬枃绔犳瘮杈冨皯錛岃繖鏄垜鎯沖啓榪欑瘒鏂囩珷鐨勫師鍥犮傚綋鐒訛紝涓嶅悓浜у晢鐨刴ake鍚勪笉鐩稿悓錛屼篃鏈変笉鍚岀殑璇硶錛屼絾鍏舵湰璐ㄩ兘鏄湪鈥滄枃浠朵緷璧?鎬р濅笂鍋氭枃绔狅紝榪欓噷錛屾垜浠呭GNU鐨刴ake榪涜璁茶堪錛屾垜鐨勭幆澧冩槸RedHat Linux 8.0錛宮ake鐨勭増鏈槸3.80銆傚繀绔燂紝榪欎釜make鏄簲鐢ㄦ渶涓哄箍娉涚殑錛屼篃鏄敤寰楁渶澶氱殑銆傝屼笖鍏惰繕鏄渶閬靛驚浜嶪EEE 1003.2-1992 鏍囧噯鐨勶紙POSIX.2錛夈?/font>
鍦ㄨ繖綃囨枃妗d腑錛屽皢浠/C++鐨勬簮鐮佷綔涓烘垜浠熀紜錛屾墍浠ュ繀鐒舵秹鍙婁竴浜涘叧浜嶤/C++鐨勭紪璇戠殑鐭ヨ瘑錛岀浉鍏充簬榪欐柟闈㈢殑鍐呭錛岃繕璇峰悇浣嶆煡鐪嬬浉鍏崇殑緙栬瘧鍣ㄧ殑鏂囨。銆傝繖閲屾墍榛樿鐨勭紪璇戝櫒鏄疷NIX涓嬬殑GCC鍜孋C銆?/font>
鍏充簬紼嬪簭鐨勭紪璇戝拰閾炬帴 鈥斺斺斺斺斺斺斺斺斺?/strong>
鍦?姝わ紝鎴戞兂澶氳鍏充簬紼嬪簭緙栬瘧鐨勪竴浜涜鑼冨拰鏂規硶錛屼竴鑸潵璇達紝鏃犺鏄疌銆丆++銆佽繕鏄痯as錛岄鍏堣鎶婃簮鏂囦歡緙栬瘧鎴愪腑闂翠唬鐮佹枃浠訛紝鍦╓indows涓嬩篃灝辨槸 .obj 鏂囦歡錛孶NIX涓嬫槸 .o 鏂囦歡錛屽嵆 Object File錛岃繖涓姩浣滃彨鍋氱紪璇戯紙compile錛夈傜劧鍚庡啀鎶婂ぇ閲忕殑Object File鍚堟垚鎵ц鏂囦歡錛岃繖涓姩浣滃彨浣滈摼鎺ワ紙link錛夈?/font>
緙栬瘧鏃訛紝緙栬瘧鍣?闇瑕佺殑鏄娉曠殑姝g‘錛屽嚱鏁頒笌鍙橀噺鐨勫0鏄庣殑姝g‘銆傚浜庡悗鑰咃紝閫氬父鏄綘闇瑕佸憡璇夌紪璇戝櫒澶存枃浠剁殑鎵鍦ㄤ綅緗紙澶存枃浠朵腑搴旇鍙槸澹版槑錛岃屽畾涔夊簲璇ユ斁鍦–/C++鏂囦歡 涓級錛屽彧瑕佹墍鏈夌殑璇硶姝g‘錛岀紪璇戝櫒灝卞彲浠ョ紪璇戝嚭涓棿鐩爣鏂囦歡銆備竴鑸潵璇達紝姣忎釜婧愭枃浠墮兘搴旇瀵瑰簲浜庝竴涓腑闂寸洰鏍囨枃浠訛紙O鏂囦歡鎴栨槸OBJ鏂囦歡錛夈?/font>
閾?鎺ユ椂錛屼富瑕佹槸閾炬帴鍑芥暟鍜屽叏灞鍙橀噺錛屾墍浠ワ紝鎴戜滑鍙互浣跨敤榪欎簺涓棿鐩爣鏂囦歡錛圤鏂囦歡鎴栨槸OBJ鏂囦歡錛夋潵閾炬帴鎴戜滑鐨勫簲鐢ㄧ▼搴忋傞摼鎺ュ櫒騫朵笉綆″嚱鏁版墍鍦ㄧ殑婧愭枃浠訛紝鍙?綆″嚱鏁扮殑涓棿鐩爣鏂囦歡錛圤bject File錛夛紝鍦ㄥぇ澶氭暟鏃跺欙紝鐢變簬婧愭枃浠跺お澶氾紝緙栬瘧鐢熸垚鐨勪腑闂寸洰鏍囨枃浠跺お澶氾紝鑰屽湪閾炬帴鏃墮渶瑕佹槑鏄懼湴鎸囧嚭涓棿鐩爣鏂囦歡鍚嶏紝榪欏浜庣紪璇戝緢涓嶆柟渚匡紝鎵浠ワ紝鎴戜滑瑕佺粰 涓棿鐩爣鏂囦歡鎵撲釜鍖咃紝鍦╓indows涓嬭繖縐嶅寘鍙滃簱鏂囦歡鈥濓紙Library File)錛屼篃灝辨槸 .lib 鏂囦歡錛屽湪UNIX涓嬶紝鏄疉rchive File錛屼篃灝辨槸 .a 鏂囦歡銆?/font>
鎬葷粨涓涓嬶紝婧愭枃浠墮鍏堜細鐢熸垚涓棿鐩爣鏂?浠訛紝鍐嶇敱涓棿鐩爣鏂囦歡鐢熸垚鎵ц鏂囦歡銆傚湪緙栬瘧鏃訛紝緙栬瘧鍣ㄥ彧媯嫻嬬▼搴忚娉曪紝鍜屽嚱鏁般佸彉閲忔槸鍚﹁澹版槑銆傚鏋滃嚱鏁版湭琚0鏄庯紝緙栬瘧鍣ㄤ細緇欏嚭涓涓鍛婏紝浣嗗彲浠ョ敓鎴?Object File銆傝屽湪閾炬帴紼嬪簭鏃訛紝閾炬帴鍣ㄤ細鍦ㄦ墍鏈夌殑Object File涓壘瀵誨嚱鏁扮殑瀹炵幇錛屽鏋滄壘涓嶅埌錛岄偅鍒板氨浼氭姤閾炬帴閿欒鐮侊紙Linker Error錛夛紝鍦╒C涓嬶紝榪欑閿欒涓鑸槸錛歀ink 2001閿欒錛屾剰鎬濊鏄錛岄摼鎺ュ櫒鏈兘鎵懼埌鍑芥暟鐨勫疄鐜般備綘闇瑕佹寚瀹氬嚱鏁扮殑Object File.
濂斤紝璦褰掓浼狅紝GNU鐨刴ake鏈夎澶氱殑鍐呭錛岄棽璦灝戝彊錛岃繕鏄鎴戜滑寮濮嬪惂銆?/font>
Makefile 浠嬬粛 鈥斺斺斺斺斺斺?/strong>
make鍛戒護鎵ц鏃訛紝闇瑕佷竴涓?Makefile 鏂囦歡錛屼互鍛婅瘔make鍛戒護闇瑕佹庝箞鏍風殑鍘葷紪璇戝拰閾炬帴紼嬪簭銆?/font>
棣栧厛錛屾垜浠敤涓涓ず渚嬫潵璇存槑Makefile鐨勪功鍐欒鍒欍備互渚跨粰澶у涓涓劅鍏磋璇嗐傝繖涓ず渚嬫潵婧愪簬GNU鐨刴ake浣跨敤鎵嬪唽錛屽湪榪欎釜紺轟緥涓紝鎴戜滑鐨勫伐紼嬫湁8涓狢鏂囦歡錛屽拰3涓ご鏂囦歡錛屾垜浠鍐欎竴涓狹akefile鏉ュ憡璇塵ake鍛戒護濡備綍緙栬瘧鍜岄摼鎺ヨ繖鍑犱釜鏂囦歡銆傛垜浠殑瑙勫垯鏄細 1錛夊鏋滆繖涓伐紼嬫病鏈夌紪璇戣繃錛岄偅涔堟垜浠殑鎵鏈塁鏂囦歡閮借緙栬瘧騫惰閾炬帴銆?br /> 2錛夊鏋滆繖涓伐紼嬬殑鏌愬嚑涓狢鏂囦歡琚慨鏀癸紝閭d箞鎴戜滑鍙紪璇戣淇敼鐨凜鏂囦歡錛屽茍閾炬帴鐩爣紼嬪簭銆?br /> 3錛夊鏋滆繖涓伐紼嬬殑澶存枃浠惰鏀瑰彉浜嗭紝閭d箞鎴戜滑闇瑕佺紪璇戝紩鐢ㄤ簡榪欏嚑涓ご鏂囦歡鐨凜鏂囦歡錛屽茍閾炬帴鐩爣紼嬪簭銆?/font>
鍙鎴戜滑鐨凪akefile鍐欏緱澶熷ソ錛屾墍鏈夌殑榪欎竴鍒囷紝鎴戜滑鍙敤涓涓猰ake鍛戒護灝卞彲浠ュ畬鎴愶紝make鍛戒護浼氳嚜鍔ㄦ櫤鑳藉湴鏍規嵁褰撳墠鐨勬枃浠朵慨鏀圭殑鎯呭喌鏉ョ‘瀹氬摢浜涙枃浠墮渶瑕侀噸緙栬瘧錛屼粠鑰岃嚜宸辯紪璇戞墍闇瑕佺殑鏂囦歡鍜岄摼鎺ョ洰鏍囩▼搴忋?/font>
涓銆丮akefile鐨勮鍒?/strong>
鍦ㄨ榪拌繖涓狹akefile涔嬪墠錛岃繕鏄鎴戜滑鍏堟潵綺楃暐鍦扮湅涓鐪婱akefile鐨勮鍒欍?/font>
target ... : prerequisites ... command ... ...
target涔熷氨鏄竴涓洰鏍囨枃浠訛紝鍙互鏄疧bject File錛屼篃鍙互鏄墽琛屾枃浠躲傝繕鍙互鏄竴涓爣絳撅紙Label錛夛紝瀵逛簬鏍囩榪欑鐗規э紝鍦ㄥ悗緇殑鈥滀吉鐩爣鈥濈珷鑺備腑浼氭湁鍙欒堪銆?/font>
prerequisites灝辨槸錛岃鐢熸垚閭d釜target鎵闇瑕佺殑鏂囦歡鎴栨槸鐩爣銆?/font>
command涔熷氨鏄痬ake闇瑕佹墽琛岀殑鍛戒護銆傦紙浠繪剰鐨凷hell鍛戒護錛?/font>
榪?鏄竴涓枃浠剁殑渚濊禆鍏崇郴錛屼篃灝辨槸璇達紝target榪欎竴涓垨澶氫釜鐨勭洰鏍囨枃浠朵緷璧栦簬prerequisites涓殑鏂囦歡錛屽叾鐢熸垚瑙勫垯瀹氫箟鍦╟ommand涓傝 鐧戒竴鐐瑰氨鏄錛宲rerequisites涓鏋滄湁涓涓互涓婄殑鏂囦歡姣攖arget鏂囦歡瑕佹柊鐨勮瘽錛宑ommand鎵瀹氫箟鐨勫懡浠ゅ氨浼氳鎵ц銆傝繖灝辨槸 Makefile鐨勮鍒欍備篃灝辨槸Makefile涓渶鏍稿績鐨勫唴瀹廣?/font>
璇村埌搴曪紝Makefile鐨勪笢瑗垮氨鏄繖鏍蜂竴鐐癸紝濂藉儚鎴戠殑榪欑瘒鏂囨。涔熻緇撴潫浜嗐傚懙鍛點傝繕涓嶅敖鐒訛紝榪欐槸Makefile鐨勪富綰垮拰鏍稿績錛屼絾瑕佸啓濂戒竴涓狹akefile榪樹笉澶燂紝鎴戜細浠ュ悗闈竴鐐逛竴鐐瑰湴緇撳悎鎴戠殑宸ヤ綔緇忛獙緇欎綘鎱㈡參鍒版潵銆傚唴瀹硅繕澶氱潃鍛€傦細錛?/font>
浜屻佷竴涓ず渚?/strong>
姝e鍓嶉潰鎵璇寸殑錛屽鏋滀竴涓伐紼嬫湁3涓ご鏂囦歡錛屽拰8涓狢鏂囦歡錛屾垜浠負浜嗗畬鎴愬墠闈㈡墍榪扮殑閭d笁涓鍒欙紝鎴戜滑鐨凪akefile搴旇鏄笅闈㈢殑榪欎釜鏍峰瓙鐨勩?/font>
edit : main.o kbd.o command.o display.o \ insert.o search.o files.o utils.o cc -o edit main.o kbd.o command.o display.o \ insert.o search.o files.o utils.o
main.o : main.c defs.h cc -c main.c kbd.o : kbd.c defs.h command.h cc -c kbd.c command.o : command.c defs.h command.h cc -c command.c display.o : display.c defs.h buffer.h cc -c display.c insert.o : insert.c defs.h buffer.h cc -c insert.c search.o : search.c defs.h buffer.h cc -c search.c files.o : files.c defs.h buffer.h command.h cc -c files.c utils.o : utils.c defs.h cc -c utils.c clean : rm edit main.o kbd.o command.o display.o \ insert.o search.o files.o utils.o
鍙?鏂滄潬錛圽錛夋槸鎹㈣絎︾殑鎰忔濄傝繖鏍鋒瘮杈冧究浜嶮akefile鐨勬槗璇匯傛垜浠彲浠ユ妸榪欎釜鍐呭淇濆瓨鍦ㄦ枃浠朵負鈥淢akefile鈥濇垨鈥渕akefile鈥濈殑鏂囦歡涓紝 鐒跺悗鍦ㄨ鐩綍涓嬬洿鎺ヨ緭鍏ュ懡浠も渕ake鈥濆氨鍙互鐢熸垚鎵ц鏂囦歡edit銆傚鏋滆鍒犻櫎鎵ц鏂囦歡鍜屾墍鏈夌殑涓棿鐩爣鏂囦歡錛岄偅涔堬紝鍙綆鍗曞湴鎵ц涓涓嬧渕ake clean鈥濆氨鍙互浜嗐?/font>
鍦ㄨ繖涓猰akefile涓紝鐩爣鏂囦歡 錛坱arget錛夊寘鍚細鎵ц鏂囦歡edit鍜屼腑闂寸洰鏍囨枃浠訛紙*.o錛夛紝渚濊禆鏂囦歡錛坧rerequisites錛夊氨鏄啋鍙峰悗闈㈢殑閭d簺 .c 鏂囦歡鍜?.h鏂囦歡銆傛瘡涓涓?.o 鏂囦歡閮芥湁涓緇勪緷璧栨枃浠訛紝鑰岃繖浜?.o 鏂囦歡鍙堟槸鎵ц鏂囦歡 edit 鐨勪緷璧栨枃浠躲備緷璧栧叧緋葷殑瀹炶川涓婂氨鏄鏄庝簡鐩爣鏂囦歡鏄敱鍝簺鏂囦歡鐢熸垚鐨勶紝鎹㈣█涔嬶紝鐩爣鏂囦歡鏄摢浜涙枃浠舵洿鏂扮殑銆?/font>
鍦?瀹氫箟濂戒緷璧栧叧緋誨悗錛屽悗緇殑閭d竴琛屽畾涔変簡濡備綍鐢熸垚鐩爣鏂囦歡鐨勬搷浣滅郴緇熷懡浠わ紝涓瀹氳浠ヤ竴涓猅ab閿綔涓哄紑澶淬傝浣忥紝make騫朵笉綆″懡浠ゆ槸鎬庝箞宸ヤ綔鐨勶紝浠栧彧綆℃墽 琛屾墍瀹氫箟鐨勫懡浠ゃ俶ake浼氭瘮杈僼argets鏂囦歡鍜宲rerequisites鏂囦歡鐨勪慨鏀規棩鏈燂紝濡傛灉prerequisites鏂囦歡鐨勬棩鏈熻姣?targets鏂囦歡鐨勬棩鏈熻鏂幫紝鎴栬卼arget涓嶅瓨鍦ㄧ殑璇濓紝閭d箞錛宮ake灝變細鎵ц鍚庣畫瀹氫箟鐨勫懡浠ゃ?/font>
榪?閲岃璇存槑涓鐐圭殑鏄紝clean涓嶆槸涓涓枃浠訛紝瀹冨彧涓嶈繃鏄竴涓姩浣滃悕瀛楋紝鏈夌偣鍍廋璇█涓殑lable涓鏍鳳紝鍏跺啋鍙峰悗浠涔堜篃娌℃湁錛岄偅涔堬紝make灝變笉浼氳嚜鍔ㄥ幓 鎵炬枃浠剁殑渚濊禆鎬э紝涔熷氨涓嶄細鑷姩鎵ц鍏跺悗鎵瀹氫箟鐨勫懡浠ゃ傝鎵ц鍏跺悗鐨勫懡浠わ紝灝辮鍦╩ake鍛戒護鍚庢槑鏄懼緱鎸囧嚭榪欎釜lable鐨勫悕瀛椼傝繖鏍風殑鏂規硶闈炲父鏈夌敤錛屾垜浠?鍙互鍦ㄤ竴涓猰akefile涓畾涔変笉鐢ㄧ殑緙栬瘧鎴栨槸鍜岀紪璇戞棤鍏崇殑鍛戒護錛屾瘮濡傜▼搴忕殑鎵撳寘錛岀▼搴忕殑澶囦喚錛岀瓑絳夈?/font>
涓夈乵ake鏄浣曞伐浣滅殑
鍦ㄩ粯璁ょ殑鏂瑰紡涓嬶紝涔熷氨鏄垜浠彧杈撳叆make鍛戒護銆傞偅涔堬紝
1銆乵ake浼氬湪褰撳墠鐩綍涓嬫壘鍚嶅瓧鍙淢akefile鈥濇垨鈥渕akefile鈥濈殑鏂囦歡銆?br /> 2銆佸鏋滄壘鍒幫紝瀹冧細鎵炬枃浠朵腑鐨勭涓涓洰鏍囨枃浠訛紙target錛夛紝鍦ㄤ笂闈㈢殑渚嬪瓙涓紝浠栦細鎵懼埌鈥渆dit鈥濊繖涓枃浠訛紝騫舵妸榪欎釜鏂囦歡浣滀負鏈緇堢殑鐩爣鏂囦歡銆?br /> 3銆佸鏋渆dit鏂囦歡涓嶅瓨鍦紝鎴栨槸edit鎵渚濊禆鐨勫悗闈㈢殑 .o 鏂囦歡鐨勬枃浠朵慨鏀規椂闂磋姣攅dit榪欎釜鏂囦歡鏂幫紝閭d箞錛屼粬灝變細鎵ц鍚庨潰鎵瀹氫箟鐨勫懡浠ゆ潵鐢熸垚edit榪欎釜鏂囦歡銆?br /> 4銆佸鏋渆dit鎵渚濊禆鐨?o鏂囦歡涔熷瓨鍦紝閭d箞make浼氬湪褰撳墠鏂囦歡涓壘鐩爣涓?o鏂囦歡鐨勪緷璧栨э紝濡傛灉鎵懼埌鍒欏啀鏍規嵁閭d竴涓鍒欑敓鎴?o鏂囦歡銆傦紙榪欐湁鐐瑰儚涓涓爢鏍堢殑榪囩▼錛?br /> 5銆佸綋鐒訛紝浣犵殑C鏂囦歡鍜孒鏂囦歡鏄瓨鍦ㄧ殑鍟︼紝浜庢槸make浼氱敓鎴?.o 鏂囦歡錛岀劧鍚庡啀鐢?.o 鏂囦歡鐢熷懡make鐨勭粓鏋佷換鍔★紝涔熷氨鏄墽琛屾枃浠秂dit浜嗐?/font>
榪?灝辨槸鏁翠釜make鐨勪緷璧栨э紝make浼氫竴灞傚張涓灞傚湴鍘繪壘鏂囦歡鐨勪緷璧栧叧緋伙紝鐩村埌鏈緇堢紪璇戝嚭絎竴涓洰鏍囨枃浠躲傚湪鎵懼鐨勮繃紼嬩腑錛屽鏋滃嚭鐜伴敊璇紝姣斿鏈鍚庤渚濊禆鐨?鏂囦歡鎵句笉鍒幫紝閭d箞make灝變細鐩存帴閫鍑猴紝騫舵姤閿欙紝鑰屽浜庢墍瀹氫箟鐨勫懡浠ょ殑閿欒錛屾垨鏄紪璇戜笉鎴愬姛錛宮ake鏍規湰涓嶇悊銆俶ake鍙鏂囦歡鐨勪緷璧栨э紝鍗籌紝濡傛灉鍦ㄦ垜 鎵句簡渚濊禆鍏崇郴涔嬪悗錛屽啋鍙峰悗闈㈢殑鏂囦歡榪樻槸涓嶅湪錛岄偅涔堝涓嶈搗錛屾垜灝變笉宸ヤ綔鍟︺?/font>
閫氳繃涓婅堪鍒嗘瀽錛屾垜浠煡閬擄紝鍍廲lean榪欑錛屾病鏈夎絎竴涓洰鏍囨枃浠剁洿鎺ユ垨闂存帴鍏寵仈錛岄偅涔堝畠鍚庨潰鎵瀹氫箟鐨勫懡浠ゅ皢涓嶄細琚嚜鍔ㄦ墽琛岋紝涓嶈繃錛屾垜浠彲浠ユ樉紺鴻make鎵ц銆傚嵆鍛戒護鈥斺斺渕ake clean鈥濓紝浠ユ鏉ユ竻闄ゆ墍鏈夌殑鐩爣鏂囦歡錛屼互渚塊噸緙栬瘧銆?/font>
浜?鏄湪鎴戜滑緙栫▼涓紝濡傛灉榪欎釜宸ョ▼宸茶緙栬瘧榪囦簡錛屽綋鎴戜滑淇敼浜嗗叾涓竴涓簮鏂囦歡錛屾瘮濡?file.c錛岄偅涔堟牴鎹垜浠殑渚濊禆鎬э紝鎴戜滑鐨勭洰鏍噁ile.o浼氳閲嶇紪璇戯紙涔熷氨鏄湪榪欎釜渚濇у叧緋誨悗闈㈡墍瀹氫箟鐨勫懡浠わ級錛屼簬鏄痜ile.o鐨勬枃浠朵篃鏄渶鏂扮殑 鍟︼紝浜庢槸file.o鐨勬枃浠朵慨鏀規椂闂磋姣攅dit瑕佹柊錛屾墍浠dit涔熶細琚噸鏂伴摼鎺ヤ簡錛堣瑙乪dit鐩爣鏂囦歡鍚庡畾涔夌殑鍛戒護錛夈?/font>
鑰屽鏋滄垜浠敼鍙樹簡鈥渃ommand.h鈥濓紝閭d箞錛宬db.o銆乧ommand.o鍜宖iles.o閮戒細琚噸緙栬瘧錛屽茍涓旓紝edit浼氳閲嶉摼鎺ャ?/font>
鍥涖乵akefile涓嬌鐢ㄥ彉閲?/strong>
鍦ㄤ笂闈㈢殑渚嬪瓙涓紝鍏堣鎴戜滑鐪嬬湅edit鐨勮鍒欙細
edit : main.o kbd.o command.o display.o \ insert.o search.o files.o utils.o cc -o edit main.o kbd.o command.o display.o \ insert.o search.o files.o utils.o
鎴?浠彲浠ョ湅鍒癧.o]鏂囦歡鐨勫瓧絎︿覆琚噸澶嶄簡涓ゆ錛屽鏋滄垜浠殑宸ョ▼闇瑕佸姞鍏ヤ竴涓柊鐨刐.o]鏂囦歡錛岄偅涔堟垜浠渶瑕佸湪涓や釜鍦版柟鍔狅紙搴旇鏄笁涓湴鏂癸紝榪樻湁涓涓湴鏂瑰湪 clean涓級銆傚綋鐒訛紝鎴戜滑鐨刴akefile騫朵笉澶嶆潅錛屾墍浠ュ湪涓や釜鍦版柟鍔犱篃涓嶇瘡錛屼絾濡傛灉 makefile鍙樺緱澶嶆潅錛岄偅涔堟垜浠氨鏈夊彲鑳戒細蹇樻帀涓涓渶瑕佸姞鍏ョ殑鍦版柟錛岃屽鑷寸紪璇戝け璐ャ傛墍浠ワ紝涓轟簡makefile鐨勬槗緇存姢錛屽湪makefile涓垜浠?鍙互浣跨敤鍙橀噺銆俶akefile鐨勫彉閲忎篃灝辨槸涓涓瓧絎︿覆錛岀悊瑙f垚C璇█涓殑瀹忓彲鑳戒細鏇村ソ銆?/font>
姣斿錛屾垜浠0鏄庝竴涓彉閲忥紝鍙玱bjects, OBJECTS, objs, OBJS, obj, 鎴栨槸 OBJ錛屽弽姝d笉綆′粈涔堝暒錛屽彧瑕佽兘澶熻〃紺簅bj鏂囦歡灝辮浜嗐傛垜浠湪makefile涓寮濮嬪氨榪欐牱瀹氫箟錛?/font>
objects = main.o kbd.o command.o display.o \ insert.o search.o files.o utils.o
浜庢槸錛屾垜浠氨鍙互寰堟柟渚垮湴鍦ㄦ垜浠殑makefile涓互鈥?(objects)鈥濈殑鏂瑰紡鏉ヤ嬌鐢ㄨ繖涓彉閲忎簡錛屼簬鏄垜浠殑鏀硅壇鐗坢akefile灝卞彉鎴愪笅闈㈣繖涓牱瀛愶細
objects = main.o kbd.o command.o display.o \ insert.o search.o files.o utils.o
edit : $(objects) cc -o edit $(objects) main.o : main.c defs.h cc -c main.c kbd.o : kbd.c defs.h command.h cc -c kbd.c command.o : command.c defs.h command.h cc -c command.c display.o : display.c defs.h buffer.h cc -c display.c insert.o : insert.c defs.h buffer.h cc -c insert.c search.o : search.c defs.h buffer.h cc -c search.c files.o : files.c defs.h buffer.h command.h cc -c files.c utils.o : utils.c defs.h cc -c utils.c clean : rm edit $(objects)
浜庢槸濡傛灉鏈夋柊鐨?.o 鏂囦歡鍔犲叆錛屾垜浠彧闇綆鍗曞湴淇敼涓涓?objects 鍙橀噺灝卞彲浠ヤ簡銆?/font>
鍏充簬鍙橀噺鏇村鐨勮瘽棰橈紝鎴戜細鍦ㄥ悗緇粰浣犱竴涓閬撴潵銆?/font>
浜斻佽make鑷姩鎺ㄥ
GNU鐨刴ake寰堝己澶э紝瀹冨彲浠ヨ嚜鍔ㄦ帹瀵兼枃浠朵互鍙婃枃浠朵緷璧栧叧緋誨悗闈㈢殑鍛戒護錛屼簬鏄垜浠氨娌″繀瑕佸幓鍦ㄦ瘡涓涓猍.o]鏂囦歡鍚庨兘鍐欎笂綾諱技鐨勫懡浠わ紝鍥犱負錛屾垜浠殑make浼氳嚜鍔ㄨ瘑鍒紝騫惰嚜宸辨帹瀵煎懡浠ゃ?/font>
鍙?瑕乵ake鐪嬪埌涓涓猍.o]鏂囦歡錛屽畠灝變細鑷姩鐨勬妸[.c]鏂囦歡鍔犲湪渚濊禆鍏崇郴涓紝濡傛灉make 鎵懼埌涓涓獁hatever.o錛岄偅涔坵hatever.c錛屽氨浼氭槸whatever.o鐨勪緷璧栨枃浠躲傚茍涓?cc -c whatever.c 涔熶細琚帹瀵煎嚭鏉ワ紝浜庢槸錛屾垜浠殑makefile鍐嶄篃涓嶇敤鍐欏緱榪欎箞澶嶆潅銆傛垜浠殑鏄柊鐨刴akefile鍙堝嚭鐐変簡銆?/font>
objects = main.o kbd.o command.o display.o \ insert.o search.o files.o utils.o
edit : $(objects) cc -o edit $(objects)
main.o : defs.h kbd.o : defs.h command.h command.o : defs.h command.h display.o : defs.h buffer.h insert.o : defs.h buffer.h search.o : defs.h buffer.h files.o : defs.h buffer.h command.h utils.o : defs.h
.PHONY : clean clean : rm edit $(objects)
榪欑鏂規硶錛屼篃灝辨槸make鐨勨滈殣鏅﹁鍒欌濄備笂闈㈡枃浠跺唴瀹逛腑錛屸?PHONY鈥濊〃紺猴紝clean鏄釜浼洰鏍囨枃浠躲?/font>
鍏充簬鏇翠負璇︾粏鐨勨滈殣鏅﹁鍒欌濆拰鈥滀吉鐩爣鏂囦歡鈥濓紝鎴戜細鍦ㄥ悗緇粰浣犱竴涓閬撴潵銆?/font>
鍏佸彟綾婚鏍肩殑makefile
鍗崇劧鎴戜滑鐨刴ake鍙互鑷姩鎺ㄥ鍛戒護錛岄偅涔堟垜鐪嬪埌閭e爢[.o]鍜孾.h]鐨勪緷璧栧氨鏈夌偣涓嶇埥錛岄偅涔堝鐨勯噸澶嶇殑[.h]錛岃兘涓嶈兘鎶婂叾鏀舵嫝璧鋒潵錛屽ソ鍚э紝娌℃湁闂錛岃繖涓浜巑ake鏉ヨ寰堝鏄擄紝璋佸彨瀹冩彁渚涗簡鑷姩鎺ㄥ鍛戒護鍜屾枃浠剁殑鍔熻兘鍛紵鏉ョ湅鐪嬫渶鏂伴鏍肩殑makefile鍚с?/font>
objects = main.o kbd.o command.o display.o \ insert.o search.o files.o utils.o
edit : $(objects) cc -o edit $(objects)
$(objects) : defs.h kbd.o command.o files.o : command.h display.o insert.o search.o files.o : buffer.h
.PHONY : clean clean : rm edit $(objects)
榪欑椋庢牸錛岃鎴戜滑鐨刴akefile鍙樺緱寰堢畝鍗曪紝浣嗘垜浠殑鏂囦歡渚濊禆鍏崇郴灝辨樉寰楁湁鐐瑰噷涔變簡銆傞奔鍜岀唺鎺屼笉鍙吋寰椼傝繕鐪嬩綘鐨勫枩濂戒簡銆傛垜鏄笉鍠滄榪欑椋庢牸鐨勶紝涓鏄枃浠剁殑渚濊禆鍏崇郴鐪嬩笉娓呮錛屼簩鏄鏋滄枃浠朵竴澶氾紝瑕佸姞鍏ュ嚑涓柊鐨?o鏂囦歡錛岄偅灝辯悊涓嶆竻妤氫簡銆?/font>
涓冦佹竻絀虹洰鏍囨枃浠剁殑瑙勫垯
姣忎釜Makefile涓兘搴旇鍐欎竴涓竻絀虹洰鏍囨枃浠訛紙.o鍜屾墽琛屾枃浠訛級鐨勮鍒欙紝榪欎笉浠呬究浜庨噸緙栬瘧錛屼篃寰堝埄浜庝繚鎸佹枃浠剁殑娓呮磥銆傝繖鏄竴涓滀慨鍏燴濓紙鍛靛懙錛岃繕璁板緱鎴戠殑銆婄紪紼嬩慨鍏匯嬪悧錛夈備竴鑸殑椋庢牸閮芥槸錛?/font>
clean: rm edit $(objects)
鏇翠負紼沖仴鐨勫仛娉曟槸錛?/font>
.PHONY : clean clean : -rm edit $(objects)
鍓?闈㈣榪囷紝.PHONY鎰忔濊〃紺篶lean鏄竴涓滀吉鐩爣鈥濓紝銆傝屽湪rm鍛戒護鍓嶉潰鍔犱簡涓涓皬鍑忓彿鐨勬剰鎬濆氨鏄紝涔熻鏌愪簺鏂囦歡鍑虹幇闂錛屼絾涓嶈綆★紝緇х畫鍋氬悗闈㈢殑 浜嬨傚綋鐒訛紝clean鐨勮鍒欎笉瑕佹斁鍦ㄦ枃浠剁殑寮澶達紝涓嶇劧錛岃繖灝變細鍙樻垚make鐨勯粯璁ょ洰鏍囷紝鐩鎬俊璋佷篃涓嶆効鎰忚繖鏍楓備笉鎴愭枃鐨勮鐭╂槸鈥斺斺渃lean浠庢潵閮芥槸鏀懼湪 鏂囦歡鐨勬渶鍚庘濄?/font>
涓婇潰灝辨槸涓涓猰akefile鐨勬璨岋紝涔熸槸makefile鐨勫熀紜錛屼笅闈㈣繕鏈夊緢澶歮akefile鐨勭浉鍏崇粏鑺傦紝鍑嗗濂戒簡鍚楋紵鍑嗗濂戒簡灝辨潵銆?/font>
Makefile 鎬昏堪 鈥斺斺斺斺斺斺?/font>
涓銆丮akefile閲屾湁浠涔堬紵
Makefile閲屼富瑕佸寘鍚簡浜斾釜涓滆タ錛氭樉寮忚鍒欍侀殣鏅﹁鍒欍佸彉閲忓畾涔夈佹枃浠舵寚紺哄拰娉ㄩ噴銆?/font>
1銆佹樉寮忚鍒欍傛樉寮忚鍒欒鏄庝簡錛屽浣曠敓鎴愪竴涓垨澶氱殑鐨勭洰鏍囨枃浠躲傝繖鏄敱Makefile鐨勪功鍐欒呮槑鏄炬寚鍑猴紝瑕佺敓鎴愮殑鏂囦歡錛屾枃浠剁殑渚濊禆鏂囦歡錛岀敓鎴愮殑鍛戒護銆?/font>
2銆侀殣鏅﹁鍒欍傜敱浜庢垜浠殑make鏈夎嚜鍔ㄦ帹瀵肩殑鍔熻兘錛屾墍浠ラ殣鏅︾殑瑙勫垯鍙互璁╂垜浠瘮杈冪矖緋欏湴綆鐣ュ湴涔﹀啓Makefile錛岃繖鏄敱make鎵鏀寔鐨勩?/font>
3銆佸彉閲忕殑瀹氫箟銆傚湪Makefile涓垜浠瀹氫箟涓緋誨垪鐨勫彉閲忥紝鍙橀噺涓鑸兘鏄瓧絎︿覆錛岃繖涓湁鐐逛綘C璇█涓殑瀹忥紝褰揗akefile琚墽琛屾椂錛屽叾涓殑鍙橀噺閮戒細琚墿灞曞埌鐩稿簲鐨勫紩鐢ㄤ綅緗笂銆?/font>
4銆?鏂囦歡鎸囩ず銆傚叾鍖呮嫭浜嗕笁涓儴鍒嗭紝涓涓槸鍦ㄤ竴涓狹akefile涓紩鐢ㄥ彟涓涓?Makefile錛屽氨鍍廋璇█涓殑include涓鏍鳳紱鍙︿竴涓槸鎸囨牴鎹煇浜涙儏鍐墊寚瀹歁akefile涓殑鏈夋晥閮ㄥ垎錛屽氨鍍廋璇█涓殑棰勭紪璇?if涓鏍鳳紱榪樻湁 灝辨槸瀹氫箟涓涓琛岀殑鍛戒護銆傛湁鍏寵繖涓閮ㄥ垎鐨勫唴瀹癸紝鎴戜細鍦ㄥ悗緇殑閮ㄥ垎涓榪般?/font>
5銆佹敞閲娿侻akefile涓彧鏈夎娉ㄩ噴錛屽拰UNIX鐨凷hell鑴氭湰涓鏍鳳紝鍏舵敞閲婃槸鐢ㄢ?鈥濆瓧絎︼紝榪欎釜灝卞儚C/C++涓殑鈥?/鈥濅竴鏍楓傚鏋滀綘瑕佸湪浣犵殑Makefile涓嬌鐢ㄢ?鈥濆瓧絎︼紝鍙互鐢ㄥ弽鏂滄榪涜杞箟錛屽錛氣淺#鈥濄?/font>
鏈鍚庯紝榪樺煎緱涓鎻愮殑鏄紝鍦∕akefile涓殑鍛戒護錛屽繀欏昏浠Tab]閿紑濮嬨?/font>
浜屻丮akefile鐨勬枃浠跺悕
榛?璁ょ殑鎯呭喌涓嬶紝make鍛戒護浼氬湪褰撳墠鐩綍涓嬫寜欏哄簭鎵懼鏂囦歡鍚嶄負鈥淕NUmakefile鈥濄?鈥渕akefile鈥濄佲淢akefile鈥濈殑鏂囦歡錛屾壘鍒頒簡瑙i噴榪欎釜鏂囦歡銆傚湪榪欎笁涓枃浠跺悕涓紝鏈濂戒嬌鐢ㄢ淢akefile鈥濊繖涓枃浠跺悕錛屽洜涓猴紝榪欎釜鏂囦歡鍚?絎竴涓瓧絎︿負澶у啓錛岃繖鏍鋒湁涓縐嶆樉鐩殑鎰熻銆傛渶濂戒笉瑕佺敤鈥淕NUmakefile鈥濓紝榪欎釜鏂囦歡鏄疓NU鐨刴ake璇嗗埆鐨勩傛湁鍙﹀涓浜沵ake鍙鍏ㄥ皬鍐欑殑 鈥渕akefile鈥濇枃浠跺悕鏁忔劅錛屼絾鏄熀鏈笂鏉ヨ錛屽ぇ澶氭暟鐨刴ake閮芥敮鎸佲渕akefile鈥濆拰鈥淢akefile鈥濊繖涓ょ榛樿鏂囦歡鍚嶃?/font>
褰?鐒訛紝浣犲彲浠ヤ嬌鐢ㄥ埆鐨勬枃浠跺悕鏉ヤ功鍐橫akefile錛屾瘮濡傦細鈥淢ake.Linux鈥濓紝 鈥淢ake.Solaris鈥濓紝鈥淢ake.AIX鈥濈瓑錛屽鏋滆鎸囧畾鐗瑰畾鐨凪akefile錛屼綘鍙互浣跨敤make鐨勨?f鈥濆拰鈥?-file鈥濆弬鏁幫紝濡傦細 make -f Make.Linux鎴杕ake --file Make.AIX銆?/font>
涓夈佸紩鐢ㄥ叾瀹冪殑Makefile
鍦∕akefile浣跨敤include鍏抽敭瀛楀彲浠ユ妸鍒殑Makefile鍖呭惈榪涙潵錛岃繖寰堝儚C璇█鐨?include錛岃鍖呭惈鐨勬枃浠朵細鍘熸ā鍘熸牱鐨勬斁鍦ㄥ綋鍓嶆枃浠剁殑鍖呭惈浣嶇疆銆俰nclude鐨勮娉曟槸錛?/font>
include <filename>
filename鍙互鏄綋鍓嶆搷浣滅郴緇烻hell鐨勬枃浠舵ā寮忥紙鍙互淇濆惈璺緞鍜岄氶厤絎︼級
鍦╥nclude 鍓嶉潰鍙互鏈変竴浜涚┖瀛楃錛屼絾鏄粷涓嶈兘鏄痆Tab]閿紑濮嬨俰nclude鍜?<filename>鍙互鐢ㄤ竴涓垨澶氫釜絀烘牸闅斿紑銆備婦涓緥瀛愶紝浣犳湁榪欐牱鍑犱釜Makefile錛歛.mk銆乥.mk銆乧.mk錛岃繕鏈変竴涓枃浠跺彨 foo.make錛屼互鍙婁竴涓彉閲?(bar)錛屽叾鍖呭惈浜唀.mk鍜宖.mk錛岄偅涔堬紝涓嬮潰鐨勮鍙ワ細
include foo.make *.mk $(bar)
絳変環浜庯細
include foo.make a.mk b.mk c.mk e.mk f.mk
make 鍛戒護寮濮嬫椂錛屼細鎶婃壘瀵籭nclude鎵鎸囧嚭鐨勫叾瀹僊akefile錛屽茍鎶婂叾鍐呭瀹夌疆鍦ㄥ綋鍓嶇殑浣嶇疆銆傚氨濂藉儚C/C++鐨?include鎸囦護涓鏍楓傚鏋滄枃浠?閮芥病鏈夋寚瀹氱粷瀵硅礬寰勬垨鏄浉瀵硅礬寰勭殑璇濓紝make浼氬湪褰撳墠鐩綍涓嬮鍏堝鎵撅紝濡傛灉褰撳墠鐩綍涓嬫病鏈夋壘鍒幫紝閭d箞錛宮ake榪樹細鍦ㄤ笅闈㈢殑鍑犱釜鐩綍涓嬫壘錛?/font>
1銆佸鏋渕ake鎵ц鏃訛紝鏈夆?I鈥濇垨鈥?-include-dir鈥濆弬鏁幫紝閭d箞make灝變細鍦ㄨ繖涓弬鏁版墍鎸囧畾鐨勭洰褰曚笅鍘誨鎵俱?br /> 2銆佸鏋滅洰褰?lt;prefix>/include錛堜竴鑸槸錛?usr/local/bin鎴?usr/include錛夊瓨鍦ㄧ殑璇濓紝make涔熶細鍘繪壘銆?/font>
濡?鏋滄湁鏂囦歡娌℃湁鎵懼埌鐨勮瘽錛宮ake浼氱敓鎴愪竴鏉¤鍛婁俊鎭紝浣嗕笉浼氶┈涓婂嚭鐜拌嚧鍛介敊璇傚畠浼氱戶緇澆鍏ュ叾瀹冪殑鏂囦歡錛屼竴鏃﹀畬鎴恗akefile鐨勮鍙栵紝make浼氬啀閲?璇曡繖浜涙病鏈夋壘鍒幫紝鎴栨槸涓嶈兘璇誨彇鐨勬枃浠訛紝濡傛灉榪樻槸涓嶈錛宮ake鎵嶄細鍑虹幇涓鏉¤嚧鍛戒俊鎭傚鏋滀綘鎯寵make涓嶇悊閭d簺鏃犳硶璇誨彇鐨勬枃浠訛紝鑰岀戶緇墽琛岋紝浣犲彲浠ュ湪 include鍓嶅姞涓涓噺鍙封?鈥濄傚錛?/font>
-include <filename> 鍏惰〃紺猴紝鏃犺include榪囩▼涓嚭鐜頒粈涔堥敊璇紝閮戒笉瑕佹姤閿欑戶緇墽琛屻傚拰鍏跺畠鐗堟湰make鍏煎鐨勭浉鍏沖懡浠ゆ槸sinclude錛屽叾浣滅敤鍜岃繖涓涓槸涓鏍風殑銆?/font>
鍥涖佺幆澧冨彉閲?MAKEFILES
濡?鏋滀綘鐨勫綋鍓嶇幆澧冧腑瀹氫箟浜嗙幆澧冨彉閲廙AKEFILES錛岄偅涔堬紝make浼氭妸榪欎釜鍙橀噺涓殑鍊煎仛涓涓被浼間簬include鐨勫姩浣溿傝繖涓彉閲忎腑鐨勫兼槸鍏跺畠鐨?Makefile錛岀敤絀烘牸鍒嗛殧銆傚彧鏄紝瀹冨拰include涓嶅悓鐨勬槸錛屼粠榪欎釜鐜鍙樹腑寮曞叆鐨?Makefile鐨勨滅洰鏍団濅笉浼氳搗浣滅敤錛屽鏋滅幆澧冨彉閲忎腑瀹氫箟鐨勬枃浠跺彂鐜伴敊璇紝make涔熶細涓嶇悊銆?/font>
浣?鏄湪榪欓噷鎴戣繕鏄緩璁笉瑕佷嬌鐢ㄨ繖涓幆澧冨彉閲忥紝鍥犱負鍙榪欎釜鍙橀噺涓琚畾涔夛紝閭d箞褰撲綘浣跨敤make 鏃訛紝鎵鏈夌殑Makefile閮戒細鍙楀埌瀹冪殑褰卞搷錛岃繖緇濅笉鏄綘鎯崇湅鍒扮殑銆傚湪榪欓噷鎻愯繖涓簨錛屽彧鏄負浜嗗憡璇夊ぇ瀹訛紝涔熻鏈夋椂鍊欎綘鐨凪akefile鍑虹幇浜嗘簨錛岄偅涔?浣犲彲浠ョ湅鐪嬪綋鍓嶇幆澧冧腑鏈夋病鏈夊畾涔夎繖涓彉閲忋?/font>
浜斻乵ake鐨勫伐浣滄柟寮?/font>
GNU鐨刴ake宸ヤ綔鏃剁殑鎵ц姝ラ鍏ヤ笅錛氾紙鎯蟲潵鍏跺畠鐨刴ake涔熸槸綾諱技錛?/font>
1銆佽鍏ユ墍鏈夌殑Makefile銆?br /> 2銆佽鍏ヨinclude鐨勫叾瀹僊akefile銆?br /> 3銆佸垵濮嬪寲鏂囦歡涓殑鍙橀噺銆?br /> 4銆佹帹瀵奸殣鏅﹁鍒欙紝騫跺垎鏋愭墍鏈夎鍒欍?br /> 5銆佷負鎵鏈夌殑鐩爣鏂囦歡鍒涘緩渚濊禆鍏崇郴閾俱?br /> 6銆佹牴鎹緷璧栧叧緋伙紝鍐沖畾鍝簺鐩爣瑕侀噸鏂扮敓鎴愩?br /> 7銆佹墽琛岀敓鎴愬懡浠ゃ?/font>
1- 5姝ヤ負絎竴涓樁孌碉紝6-7涓虹浜屼釜闃舵銆傜涓涓樁孌典腑錛屽鏋滃畾涔夌殑鍙橀噺琚嬌鐢ㄤ簡錛岄偅涔堬紝 make浼氭妸鍏跺睍寮鍦ㄤ嬌鐢ㄧ殑浣嶇疆銆備絾make騫朵笉浼氬畬鍏ㄩ┈涓婂睍寮錛宮ake浣跨敤鐨勬槸鎷栧歡鎴樻湳錛屽鏋滃彉閲忓嚭鐜板湪渚濊禆鍏崇郴鐨勮鍒欎腑錛岄偅涔堜粎褰撹繖鏉′緷璧栬鍐沖畾瑕?浣跨敤浜嗭紝鍙橀噺鎵嶄細鍦ㄥ叾鍐呴儴灞曞紑銆?/font>
褰撶劧錛岃繖涓伐浣滄柟寮忎綘涓嶄竴瀹氳娓呮錛屼絾鏄煡閬撹繖涓柟寮忎綘涔熶細瀵筸ake鏇翠負鐔熸倝銆傛湁浜嗚繖涓熀紜錛屽悗緇儴鍒嗕篃灝卞鏄撶湅鎳備簡銆?/font>
鏂囩珷鏉ユ簮:http://my.donews.com/robinchow/2007/01/10/eookhacfeksbxfdsqfxbkaljurwnvytzmhkt/ ]]>[瀵煎叆]鐞嗚ВLinux閰嶇疆鏂囦歡 http://www.shnenglu.com/robinchow/archive/2007/10/23/35017.htmlRobin Chow Robin Chow Tue, 23 Oct 2007 13:01:00 GMT http://www.shnenglu.com/robinchow/archive/2007/10/23/35017.html http://www.shnenglu.com/robinchow/comments/35017.html http://www.shnenglu.com/robinchow/archive/2007/10/23/35017.html#Feedback 0 http://www.shnenglu.com/robinchow/comments/commentRss/35017.html http://www.shnenglu.com/robinchow/services/trackbacks/35017.html Subodh Soni錛坰ubodh@in.ibm.com錛?br />IBM 杞歡宸ョ▼甯?br />2001 騫?12 鏈?br /> 鏈?
鏂囪鏄庝簡 Linux
緋葷粺鐨勯厤緗枃浠訛紝鍦ㄥ鐢ㄦ埛銆佸浠誨姟鐜涓紝閰嶇疆鏂囦歡鎺у埗鐢ㄦ埛鏉冮檺銆佺郴緇熷簲鐢ㄧ▼搴忋佸畧鎶よ繘紼嬨佹湇鍔″拰鍏跺畠綆$悊浠誨姟銆傝繖浜涗換鍔″寘鎷鐞嗙敤鎴峰笎鍙楓佸垎閰嶇鐩橀厤
棰濄佺鐞嗙數瀛愰偖浠跺拰鏂伴椈緇勶紝浠ュ強閰嶇疆鍐呮牳鍙傛暟銆傛湰鏂囪繕鏍規嵁閰嶇疆鏂囦歡鐨勪嬌鐢ㄥ拰鍏舵墍褰卞搷鐨勬湇鍔$殑鎯呭喌瀵圭洰鍓?Red Hat Linux
緋葷粺涓殑閰嶇疆鏂囦歡榪涜浜嗗垎綾匯?br />浠嬬粛 姣忎釜 Linux 紼嬪簭閮芥槸涓涓彲鎵ц鏂囦歡錛屽畠鍚湁鎿嶄綔鐮佸垪琛紝CPU
灝嗘墽琛岃繖浜涙搷浣滅爜鏉ュ畬鎴愮壒瀹氱殑鎿嶄綔銆備緥濡傦紝ls 鍛戒護鏄敱 /bin/ls
鏂囦歡鎻愪緵鐨勶紝璇ユ枃浠跺惈鏈夋満鍣ㄦ寚浠ょ殑鍒楄〃錛屽湪灞忓箷涓婃樉紺哄綋鍓嶇洰褰曚腑鏂囦歡鐨勫垪琛ㄦ椂闇瑕佷嬌鐢ㄨ繖浜涙満鍣ㄦ寚浠ゃ傚嚑涔庢瘡涓▼搴忕殑琛屼負閮藉彲浠ラ氳繃淇敼鍏墮厤緗枃浠舵潵鎸夌収鎮?
鐨勫亸濂芥垨闇瑕佸幓瀹氬埗銆?br /> Linux 涓湁娌℃湁涓涓爣鍑嗙殑閰嶇疆鏂囦歡鏍煎紡錛?br />涓鍙ヨ瘽錛屾病鏈夈備笉鐔熸倝 Linux
鐨勭敤鎴鳳紙涓瀹氾級浼氭劅鍒版伯涓э紝鍥犱負姣忎釜閰嶇疆鏂囦歡鐪嬭搗鏉ラ兘璞℃槸涓涓榪庢帴鐨勬柊鎸戞垬銆傚湪 Linux
涓紝姣忎釜紼嬪簭鍛橀兘鍙互鑷敱閫夋嫨浠栨垨濂瑰枩嬈㈢殑閰嶇疆鏂囦歡鏍煎紡銆傚彲浠ラ夋嫨鐨勬牸寮忓緢澶氾紝浠?/etc/shells 鏂囦歡錛堝畠鍖呭惈琚竴涓崲琛岀鍒嗗紑鐨?
shell 鐨勫垪琛級錛屽埌 Apache 鐨勫鏉傜殑 /etc/httpd.conf 鏂囦歡銆?br /> 浠涔堟槸緋葷粺閰嶇疆鏂囦歡錛?br />鍐呮牳鏈韓涔熷彲
浠ョ湅鎴愭槸涓涓滅▼搴忊濄備負浠涔堝唴鏍擱渶瑕侀厤緗枃浠訛紵鍐呮牳闇瑕佷簡瑙g郴緇熶腑鐢ㄦ埛鍜岀粍鐨勫垪琛紝榪涜岀鐞嗘枃浠舵潈闄愶紙鍗蟲牴鎹潈闄愬垽瀹氱壒瀹氱敤鎴鳳紙UNIX_USERS錛?
鏄惁鍙互鎵撳紑鏌愪釜鏂囦歡錛夈傛敞鎰忥紝榪欎簺鏂囦歡涓嶆槸鏄庣‘鍦扮敱紼嬪簭璇誨彇鐨勶紝鑰屾槸鐢辯郴緇熷簱鎵鎻愪緵鐨勪竴涓嚱鏁拌鍙栵紝騫惰鍐呮牳浣跨敤銆備緥濡傦紝紼嬪簭闇瑕佹煇涓敤鎴風殑錛堝姞瀵嗚繃
鐨勶級瀵嗙爜鏃朵笉搴旇鎵撳紑 /etc/passwd 鏂囦歡銆傜浉鍙嶏紝紼嬪簭搴旇璋冪敤緋葷粺搴撶殑 getpw() 鍑芥暟銆傝繖縐嶅嚱鏁頒篃琚О涓虹郴緇熻皟鐢ㄣ傛墦寮
/etc/passwd 鏂囦歡鍜屼箣鍚庢煡鎵鵑偅涓璇鋒眰鐨勭敤鎴風殑瀵嗙爜閮芥槸鐢卞唴鏍革紙閫氳繃緋葷粺搴擄級鍐沖畾鐨勩?br /> 闄ら潪鍙﹁鎸囧畾錛孯ed Hat Linux 緋葷粺涓ぇ澶氭暟閰嶇疆鏂囦歡閮藉湪 /etc 鐩綍涓傞厤緗枃浠跺彲浠ュぇ鑷村垎涓轟笅闈㈠嚑綾伙細 璁塊棶鏂囦歡 /etc/host.conf 鍛婅瘔緗戠粶鍩熷悕鏈嶅姟鍣ㄥ浣曟煡鎵句富鏈哄悕銆傦紙閫氬父鏄?/etc/hosts錛岀劧鍚庡氨鏄悕縐版湇鍔″櫒錛涘彲閫氳繃 netconf 瀵瑰叾榪涜鏇存敼錛? /etc/hosts 鍖呭惈錛堟湰鍦扮綉緇滀腑錛夊凡鐭ヤ富鏈虹殑涓涓垪琛ㄣ傚鏋滅郴緇熺殑 IP 涓嶆槸鍔ㄦ佺敓鎴愶紝灝卞彲浠ヤ嬌鐢ㄥ畠銆傚浜庣畝鍗曠殑涓繪満鍚嶈В鏋愶紙鐐瑰垎琛ㄧず娉曪級錛屽湪璇鋒眰 DNS 鎴?NIS 緗戠粶鍚嶇О鏈嶅姟鍣ㄤ箣鍓嶏紝/etc/hosts.conf 閫氬父浼氬憡璇夎В鏋愮▼搴忓厛鏌ョ湅榪欓噷銆? /etc/hosts.allow 璇峰弬闃?hosts_access 鐨勮仈鏈哄府鍔╅〉銆傝嚦灝戠敱 tcpd 璇誨彇銆? /etc/hosts.deny 璇峰弬闃?hosts_access 鐨勮仈鏈哄府鍔╅〉銆傝嚦灝戠敱 tcpd 璇誨彇銆? 寮曞鍜岀櫥褰曪紡娉ㄩ攢 /etc/issue
& /etc/issue.net 榪欎簺鏂囦歡鐢?mingetty錛堝拰綾諱技鐨勭▼搴忥級璇誨彇錛岀敤鏉ュ悜浠庣粓绔紙issue錛夋垨閫氳繃 telnet
浼氳瘽錛坕ssue.net錛夎繛鎺ョ殑鐢ㄦ埛鏄劇ず涓涓渨elcome鈥濆瓧絎︿覆銆傚畠浠寘鎷嚑琛屽0鏄?Red Hat 鐗堟湰鍙楓佸悕縐板拰鍐呮牳 ID
鐨勪俊鎭傚畠浠敱 rc.local 浣跨敤銆? /etc/redhat-release 鍖呮嫭涓琛屽0鏄?Red Hat 鐗堟湰鍙峰拰鍚嶇О鐨勪俊鎭傜敱 rc.local 浣跨敤銆? /etc/rc.d/rc 閫氬父鍦ㄦ墍鏈夎繍琛岀駭鍒繍琛岋紝綰у埆浣滀負鍙傛暟浼犻併備緥濡傦紝瑕佷互鍥懼艦錛圙raphics錛夋ā寮忥紙X-Server錛夊紩瀵兼満鍣紝璇峰湪鍛戒護琛岃繍琛屼笅闈㈢殑鍛戒護錛歩nit 5銆傝繍琛岀駭鍒?5 琛ㄧず浠ュ浘褰㈡ā寮忓紩瀵肩郴緇熴? /etc/rc.d/rc.local 闈炴寮忕殑銆傚彲浠ヤ粠 rc銆乺c.sysinit 鎴?/etc/inittab 璋冪敤銆? /etc/rc.d/rc.sysinit 閫氬父鏄墍鏈夎繍琛岀駭鍒殑絎竴涓剼鏈? /etc/rc.d/rc/rcX.d
浠?rc 榪愯鐨勮剼鏈紙X 琛ㄧず 1 鍒?5
涔嬮棿鐨勪換鎰忔暟瀛楋級銆傝繖浜涚洰褰曟槸鐗瑰畾鈥滆繍琛岀駭鍒濈殑鐩綍銆傚綋緋葷粺鍚姩鏃訛紝瀹冧細璇嗗埆瑕佸惎鍔ㄧ殑榪愯綰у埆錛岀劧鍚庤皟鐢ㄨ榪愯綰у埆鐨勭壒瀹氱洰褰曚腑瀛樺湪鐨勬墍鏈夊惎鍔ㄨ剼鏈備緥
濡傦紝緋葷粺鍚姩鏃墮氬父浼氬湪寮曞娑堟伅涔嬪悗鏄劇ず鈥渆ntering run-level 3鈥濈殑娑堟伅錛涜繖鎰忓懗鐫 /etc/rc.d/rc3.d/
鐩綍涓殑鎵鏈夊垵濮嬪寲鑴氭湰閮藉皢琚皟鐢ㄣ? 鏂囦歡緋葷粺 鍐呮牳鎻愪緵浜嗕竴涓帴鍙o紝鐢ㄦ潵鏄劇ず涓浜涘畠鐨勬暟鎹粨鏋勶紝榪欎簺鏁版嵁緇撴瀯瀵逛簬鍐沖畾
璇稿浣跨敤鐨勪腑鏂佸垵濮嬪寲鐨勮澶囧拰鍐呭瓨緇熻淇℃伅涔嬬被鐨勭郴緇熷弬鏁板彲鑳藉緢鏈夌敤銆傝繖涓帴鍙f槸浣滀負涓涓嫭绔嬩絾铏氭嫙鐨勬枃浠剁郴緇熸彁渚涚殑錛岀О涓?/proc
鏂囦歡緋葷粺銆傚緢澶氱郴緇熷疄鐢ㄧ▼搴忛兘浣跨敤榪欎釜鏂囦歡緋葷粺涓瓨鍦ㄧ殑鍊兼潵鏄劇ず緋葷粺緇熻淇℃伅銆備緥濡傦紝/proc/modules
鏂囦歡鍒椾婦緋葷粺涓綋鍓嶅姞杞界殑妯″潡銆俵smod 鍛戒護璇誨彇姝や俊鎭紝鐒跺悗灝嗗叾浠ヤ漢浠彲浠ョ湅鎳傜殑鏍煎紡鏄劇ず鍑烘潵銆備笅闈㈣〃鏍間腑鎸囧畾鐨?mtab
鏂囦歡浠ュ悓鏍風殑鏂瑰紡璇誨彇鍖呭惈褰撳墠瀹夎鐨勬枃浠剁郴緇熺殑 /proc/mount 鏂囦歡銆?/etc/mtab 榪欏皢闅忕潃 /proc/mount
鏂囦歡鐨勬敼鍙樿屼笉鏂敼鍙樸傛崲鍙ヨ瘽璇達紝鏂囦歡緋葷粺琚畨瑁呭拰鍗歌澆鏃訛紝鏀瑰彉浼氱珛鍗沖弽鏄犲埌姝ゆ枃浠朵腑銆? /etc/fstab 鍒椾婦璁$畻鏈哄綋鍓嶁滃彲浠ュ畨瑁呪濈殑鏂囦歡緋葷粺銆傝繖闈炲父閲嶈錛屽洜涓鴻綆楁満寮曞鏃跺皢榪愯 mount -a 鍛戒護錛岃鍛戒護璐熻矗瀹夎 fstab 鐨勫掓暟絎簩鍒椾腑甯︽湁鈥?鈥濇爣璁扮殑姣忎竴涓枃浠剁郴緇熴? /etc/mtools.conf DOS 綾誨瀷鐨勬枃浠剁郴緇熶笂鎵鏈夋搷浣滐紙鍒涘緩鐩綍銆佸鍒躲佹牸寮忓寲絳夌瓑錛夌殑閰嶇疆銆? 緋葷粺綆$悊 /etc/group
鍖呭惈鏈夋晥鐨勭粍鍚嶇О鍜屾寚瀹氱粍涓寘鎷殑鐢ㄦ埛銆傚崟涓鐢ㄦ埛濡傛灉鎵ц澶氫釜浠誨姟錛屽彲浠ュ瓨鍦ㄤ簬澶氫釜緇勪腑銆備緥濡傦紝濡傛灉涓涓滅敤鎴封濇槸鈥減roject
1鈥濆伐紼嬬粍鐨勬垚鍛橈紝鍚屾椂涔熸槸綆$悊鍛橈紝閭d箞鍦?group 鏂囦歡涓粬鐨勬潯鐩湅璧鋒潵灝變細鏄繖鏍風殑錛歶ser: * : group-id :
project1 /etc/nologin 濡傛灉鏈?/etc/nologin 鏂囦歡瀛樺湪錛宭ogin(1) 灝嗗彧鍏佽 root 鐢ㄦ埛榪涜璁塊棶銆傚畠灝嗗鍏跺畠鐢ㄦ埛鏄劇ず姝ゆ枃浠剁殑鍐呭騫舵嫆緇濆叾鐧誨綍銆? etc/passwd 璇峰弬闃呪渕an passwd鈥濄傚畠鍖呭惈涓浜涚敤鎴峰笎鍙蜂俊鎭紝鍖呮嫭瀵嗙爜錛堝鏋滄湭琚?shadow 紼嬪簭鍔犲瘑榪囷級銆? /etc/rpmrc rpm 鍛戒護閰嶇疆銆傛墍鏈夌殑 rpm 鍛戒護琛岄夐」閮藉彲浠ュ湪榪欎釜鏂囦歡涓竴璧瘋緗紝榪欐牱錛屽綋浠諱綍 rpm 鍛戒護鍦ㄨ緋葷粺涓繍琛屾椂錛屾墍鏈夌殑閫夐」閮戒細鍏ㄥ眬閫傜敤銆? /etc/securetty 鍖呭惈璁懼鍚嶇О錛岀敱 tty 琛岀粍鎴愶紙姣忚涓涓悕縐幫紝涓嶅寘鎷墠闈㈢殑 /dev/錛夛紝root 鐢ㄦ埛鍦ㄨ繖閲岃鍏佽鐧誨綍銆? /etc/usertty /etc/shadow 鍖呭惈鍔犲瘑鍚庣殑鐢ㄦ埛甯愬彿瀵嗙爜淇℃伅錛岃繕鍙互鍖呮嫭瀵嗙爜鏃舵晥淇℃伅銆傚寘鎷殑瀛楁鏈夛細 鐧誨綍鍚? 鍔犲瘑鍚庣殑瀵嗙爜 浠?1970 騫?1 鏈?1 鏃ュ埌瀵嗙爜鏈鍚庝竴嬈¤鏇存敼鐨勫ぉ鏁? 璺濆瘑鐮佸彲浠ユ洿鏀逛箣鍓嶇殑澶╂暟 璺濆瘑鐮佸繀欏繪洿鏀逛箣鍓嶇殑澶╂暟 瀵嗙爜鍒版湡鍓嶇敤鎴瘋璀﹀憡鐨勫ぉ鏁? 瀵嗙爜鍒版湡鍚庡笎鎴瘋紱佺敤鐨勫ぉ鏁? 浠?1970 騫?1 鏈?1 鏃ュ埌甯愬彿琚鐢ㄧ殑澶╂暟 /etc/shells 鍖呭惈緋葷粺鍙敤鐨勫彲鑳界殑鈥渟hell鈥濈殑鍒楄〃銆? /etc/motd 姣忔棩娑堟伅錛涘湪綆$悊鍛樺笇鏈涘悜 Linux 鏈嶅姟鍣ㄧ殑鎵鏈夌敤鎴蜂紶杈炬煇涓秷鎭椂浣跨敤銆? 鑱旂綉 /etc/gated.conf gated 鐨勯厤緗傚彧鑳借 gated 瀹堟姢榪涚▼鎵浣跨敤銆? /etc/gated.version 鍖呭惈 gated 瀹堟姢榪涚▼鐨勭増鏈彿銆? /etc/gateway 鐢?routed 瀹堟姢榪涚▼鍙夊湴浣跨敤銆? /etc/networks 鍒椾婦浠庢満鍣ㄦ墍榪炴帴鐨勭綉緇滃彲浠ヨ闂殑緗戠粶鍚嶅拰緗戠粶鍦板潃銆傞氳繃璺敱鍛戒護浣跨敤銆傚厑璁鎬嬌鐢ㄧ綉緇滃悕縐般? /etc/protocols 鍒椾婦褰撳墠鍙敤鐨勫崗璁傝鍙傞槄 NAG錛堢綉緇滅鐞嗗憳鎸囧崡錛孨etwork Administrators Guide錛夊拰鑱旀満甯姪欏點? C 鎺ュ彛鏄?getprotoent銆傜粷涓嶈兘鏇存敼銆? /etc/resolv.conf 鍦ㄧ▼搴忚姹傗滆В鏋愨濅竴涓?IP 鍦板潃鏃跺憡璇夊唴鏍稿簲璇ユ煡璇㈠摢涓悕縐版湇鍔″櫒銆? /etc/rpc 鍖呭惈 RPC 鎸囦護錛忚鍒欙紝榪欎簺鎸囦護錛忚鍒欏彲浠ュ湪 NFS 璋冪敤銆佽繙紼嬫枃浠剁郴緇熷畨瑁呯瓑涓嬌鐢ㄣ? /etc/exports 瑕佸鍑虹殑鏂囦歡緋葷粺錛圢FS錛夊拰瀵瑰畠鐨勬潈闄愩? /etc/services 灝嗙綉緇滄湇鍔″悕杞崲涓虹鍙e彿錛忓崗璁傜敱 inetd銆乼elnet銆乼cpdump 鍜屼竴浜涘叾瀹冪▼搴忚鍙栥傛湁涓浜?C 璁塊棶渚嬬▼銆? /etc/inetd.conf
inetd 鐨勯厤緗枃浠躲傝鍙傞槄 inetd 鑱旀満甯姪欏點傚寘鍚瘡涓綉緇滄湇鍔$殑鏉$洰錛宨netd
蹇呴』涓鴻繖浜涚綉緇滄湇鍔℃帶鍒跺畧鎶よ繘紼嬫垨鍏跺畠鏈嶅姟銆傛敞鎰忥紝鏈嶅姟灝嗕細榪愯錛屼絾鍦?/etc/services
涓皢瀹冧滑娉ㄩ噴鎺変簡錛岃繖鏍峰嵆浣胯繖浜涙湇鍔″湪榪愯涔熷皢涓嶅彲鐢ㄣ傛牸寮忎負錛? /etc/sendmail.cf 閭歡紼嬪簭 sendmail 鐨勯厤緗枃浠躲傛瘮杈冮殣鏅︼紝寰堥毦鐞嗚В銆? /etc/sysconfig/network 鎸囧嚭 NETWORKING=yes 鎴?no銆傝嚦灝戠敱 rc.sysinit 璇誨彇銆? /etc/sysconfig/network-scripts/if* Red Hat 緗戠粶閰嶇疆鑴氭湰銆? 緋葷粺鍛戒護 緋?
緇熷懡浠よ鐙崰鍦版帶鍒剁郴緇燂紝騫惰涓鍒囨甯稿伐浣溿傛墍鏈夊 login錛堝畬鎴愭帶鍒跺彴鐢ㄦ埛韜喚楠岃瘉闃舵錛夋垨
bash錛堟彁渚涚敤鎴峰拰璁$畻鏈轟箣闂翠氦浜掞級涔嬬被鐨勭▼搴忛兘鏄郴緇熷懡浠ゃ傚洜姝わ紝鍜屽畠浠湁鍏崇殑鏂囦歡涔熺壒鍒噸瑕併傝繖涓綾誨埆涓湁涓嬪垪浠ょ敤鎴峰拰綆$悊鍛樻劅鍏磋叮鐨勬枃浠躲?
/etc/lilo.conf 鍖呭惈緋葷粺鐨勭己鐪佸紩瀵煎懡浠よ鍙傛暟錛岃繕鏈夊惎鍔ㄦ椂浣跨敤鐨勪笉鍚屾槧璞°傛偍鍦?LILO 寮曞鎻愮ず鐨勬椂鍊欐寜 Tab
閿氨鍙互鐪嬪埌榪欎釜鍒楄〃銆? /etc/logrotate.conf 緇存姢 /var/log 鐩綍涓殑鏃ュ織鏂囦歡銆? /etc/identd.conf
identd 鏄竴涓湇鍔″櫒錛屽畠鎸夌収 RFC 1413 鏂囨。涓寚瀹氱殑鏂瑰紡瀹炵幇 TCP/IP 鎻愯鐨勬爣鍑?IDENT
鐢ㄦ埛韜喚璇嗗埆鍗忚銆俰dentd 鐨勬搷浣滃師鐞嗘槸鏌ユ壘鐗瑰畾 TCP/IP
榪炴帴騫惰繑鍥炴嫢鏈夋榪炴帴鐨勮繘紼嬬殑鐢ㄦ埛鍚嶃備綔涓洪夋嫨錛屽畠涔熷彲浠ヨ繑鍥炲叾瀹冧俊鎭紝鑰屼笉鏄敤鎴峰悕銆傝鍙傞槄 identd 鑱旀満甯姪欏點? /etc/ld.so.conf 鈥滃姩鎬侀摼鎺ョ▼搴忊濓紙Dynamic Linker錛夌殑閰嶇疆銆? /etc/inittab
鎸夊勾浠f潵璁詫紝榪欐槸 UNIX 涓涓涓厤緗枃浠躲傚湪涓鍙?UNIX 鏈哄櫒鎵撳紑涔嬪悗鍚姩鐨勭涓涓▼搴忔槸 init錛屽畠鐭ラ亾璇ュ惎鍔ㄤ粈涔堬紝榪欐槸鐢變簬
inittab 鐨勫瓨鍦ㄣ傚湪榪愯綰у埆鏀瑰彉鏃訛紝init 璇誨彇 inittab錛岀劧鍚庢帶鍒朵富榪涚▼鐨勫惎鍔ㄣ? /etc/termcap 涓涓暟鎹簱錛屽寘鍚墍鏈夊彲鑳界殑緇堢綾誨瀷浠ュ強榪欎簺緇堢鐨勬ц兘銆? 瀹堟姢榪涚▼ 瀹?
鎶よ繘紼嬫槸涓縐嶈繍琛屽湪闈炰氦浜掓ā寮忎笅鐨勭▼搴忋備竴鑸潵璇達紝瀹堟姢榪涚▼浠誨姟鏄拰鑱旂綉鍖哄煙鏈夊叧鐨勶細瀹冧滑絳夊緟榪炴帴錛屼互渚塊氳繃榪炴帴鎻愪緵鏈嶅姟銆侺inux 鍙互浣跨敤浠?
Web 鏈嶅姟鍣ㄥ埌 ftp 鏈嶅姟鍣ㄧ殑寰堝瀹堟姢榪涚▼銆?/etc/syslogd.conf syslogd 瀹堟姢榪涚▼鐨勯厤緗枃浠躲俿yslogd
鏄竴縐嶅畧鎶よ繘紼嬶紝瀹冭礋璐h褰曪紙鍐欏埌紓佺洏錛変粠鍏跺畠紼嬪簭鍙戦佸埌緋葷粺鐨勬秷鎭傝繖涓湇鍔″挨鍏跺父琚煇浜涘畧鎶よ繘紼嬫墍浣跨敤錛岃繖浜涘畧鎶よ繘紼嬩笉浼氭湁鍙﹀鐨勬柟娉曟潵鍙戝嚭鍙兘鏈夐棶
棰樺瓨鍦ㄧ殑淇″彿鎴栧悜鐢ㄦ埛鍙戦佹秷鎭? /etc/httpd.conf Web 鏈嶅姟鍣?Apache 鐨勯厤緗枃浠躲傝繖涓枃浠朵竴鑸笉鍦?
/etc 涓傚畠鍙兘鍦?/usr/local/httpd/conf/ 鎴?/etc/httpd/conf/
涓紝浣嗘槸瑕佺‘瀹氬畠鐨勪綅緗紝鎮ㄨ繕闇瑕佹鏌ョ壒瀹氱殑 Apache 瀹夎淇℃伅銆? /etc/conf.modules or /etc/modules.conf kerneld 鐨勯厤緗枃浠躲傛湁鎰忔濈殑鏄紝kerneld 騫朵笉鏄滀綔涓哄畧鎶よ繘紼嬬殑鈥濆唴鏍搞傚畠鍏跺疄鏄竴縐嶅湪闇瑕佹椂璐熻矗鈥滃揩閫熲濆姞杞介檮鍔犲唴鏍告ā鍧楃殑瀹堟姢榪涚▼銆? 鐢ㄦ埛紼嬪簭 鍦?
Linux錛堝拰涓鑸殑 UNIX錛変腑錛屾湁鏃犳暟鐨勨滅敤鎴封濈▼搴忋傛渶甯歌鐨勪竴縐嶇敤鎴風▼搴忛厤緗枃浠舵槸 /etc/lynx.cfg銆傝繖鏄憲鍚嶇殑鏂囨湰嫻忚鍣?
lynx 鐨勯厤緗枃浠躲傞氳繃榪欎釜鏂囦歡錛屾偍鍙互瀹氫箟浠g悊鏈嶅姟鍣ㄣ佽浣跨敤鐨勫瓧絎﹂泦絳夌瓑銆備笅闈㈢殑浠g爜鏍鋒湰灞曠ず浜?lynx.cfg
鏂囦歡鐨勪竴閮ㄥ垎錛屼慨鏀硅繖閮ㄥ垎浠g爜鍙互鏀瑰彉 Linux 緋葷粺鐨勪唬鐞嗘湇鍔″櫒璁劇疆銆傜己鐪佹儏鍐典笅錛岃繖浜涜緗傜敤浜庡湪鍚勮嚜鐨?shell 涓繍琛?lynx
鐨勬墍鏈夌敤鎴鳳紝闄ら潪鏌愪釜鐢ㄦ埛閫氳繃鎸囧畾 --cfg = "mylynx.cfg" 閲嶈浜嗙己鐪佺殑閰嶇疆鏂囦歡銆?br /> /etc/lynx.cfg 涓殑浠g悊鏈嶅姟鍣ㄨ緗?br />.h1 proxy .h2 HTTP_PROXY .h2 HTTPS_PROXY .h2 FTP_PROXY .h2 GOPHER_PROXY .h2 NEWS_PROXY .h2 NNTP_PROXY # Lynx version 2.2 and beyond supports the use of proxy servers that can act as # firewall gateways and caching servers. They are preferable to the older # gateway servers. Each protocol used by Lynx can be mapped separately using # PROTOCOL_proxy environment variables (see Lynx Users Guide). If you have # not set them externally, you can set them at run time via this configuration file. # They will not override external settings. The no_proxy variable can be used # to inhibit proxying to selected regions of the Web (see below). Note that on # VMS these proxy variables are set as process logicals rather than symbols, to # preserve lowercasing, and will outlive the Lynx image. # .ex 15 http_proxy:http://proxy3.in.ibm.com:80/ ftp_proxy:http://proxy3.in.ibm.com:80/ #http_proxy:http://penguin.in.ibm.com:8080 #ftp_proxy:http://penguin.in.ibm.com:8080/ .h2 NO_PROXY # The no_proxy variable can be a comma-separated list of strings defining # no-proxy zones in the DNS domain name space. If a tail substring of the # domain-path for a host matches one of these strings, transactions with that # node will not be proxied. .ex no_proxy:demiurge.in.ibm.com, demiurge 鏇存敼閰嶇疆鏂囦歡 鍦ㄦ洿鏀歸厤緗枃浠舵椂錛屽鏋滅▼搴忎笉鏄敱緋葷粺綆$悊鍛樻垨鍐呮牳鎺у埗鐨勶紝灝辮紜繚閲嶆柊鍚姩榪囦嬌鐢ㄨ閰嶇疆鐨勭▼搴忋傛櫘閫氱敤鎴烽氬父娌℃湁鍚姩鎴栧仠姝㈢郴緇熺▼搴忓拰錛忔垨瀹堟姢榪涚▼鐨勬潈闄愩?br /> 鍐呮牳 鏇?
鏀瑰唴鏍鎬腑鐨勯厤緗枃浠朵細绔嬪嵆褰卞搷鍒扮郴緇熴備緥濡傦紝鏇存敼 passwd 鏂囦歡浠ュ鍔犵敤鎴峰皢绔嬪嵆浣胯鐢ㄦ埛鍙樹負鍙敤銆傝屼笖浠諱綍 Linux 緋葷粺鐨?
/proc/sys
鐩綍涓兘鏈変竴浜涘唴鏍稿彲璋冨弬鏁般傚彧鏈夎秴綰х敤鎴峰彲浠ュ緱鍒板鎵鏈夎繖浜涙枃浠剁殑鍐欒闂潈鍔涳紱鍏跺畠鐢ㄦ埛鍙湁鍙璁塊棶鏉冨姏銆傛鐩綍涓枃浠剁殑鍒嗙被鐨勬柟寮忓拰 Linux
鍐呮牳婧愪唬鐮佺殑鍒嗙被鏂瑰紡涓鏍楓傛鐩綍涓殑姣忎釜鏂囦歡閮戒唬琛ㄤ竴涓唴鏍告暟鎹粨鏋勶紝榪欎簺鏁版嵁緇撴瀯鍙互琚姩鎬佸湴淇敼錛屼粠鑰屾敼鍙樼郴緇熸ц兘銆?br /> 娉ㄦ剰錛氬湪鏇存敼鍏朵腑浠諱綍鏂囦歡鐨勪換浣曞間箣鍓嶏紝鎮ㄥ簲璇ョ‘淇濊嚜宸卞叏闈簡瑙h鏂囦歡錛屼互閬垮厤瀵圭郴緇熼犳垚涓嶅彲淇鐨勬崯瀹熾?br />/proc/sys/kernel/ 鐩綍涓殑鏂囦歡 鏂囦歡鍚?鎻忚堪 threads-max 鍐呮牳鍙繍琛岀殑鏈澶т換鍔℃暟銆? ctrl-alt-del 濡傛灉鍊間負 1錛岄偅涔堥『搴忔寜涓嬭繖鍑犱釜閿皢鈥滃交搴曞湴鈥濋噸鏂板紩瀵肩郴緇熴? sysrq 濡傛灉鍊間負 1錛孉lt-SysRq 鍒欎負嬋媧葷姸鎬併? osrelease 鏄劇ず鎿嶄綔緋葷粺鐨勫彂琛岀増鐗堟湰鍙? ostype 鏄劇ず鎿嶄綔緋葷粺鐨勭被鍨嬨? hostname 緋葷粺鐨勪富鏈哄悕銆? domainname 緗戠粶鍩燂紝緋葷粺鏄緗戠粶鍩熺殑涓閮ㄥ垎銆? modprobe 鎸囧畾 modprobe 鏄惁搴旇鍦ㄥ惎鍔ㄦ椂鑷姩榪愯騫跺姞杞藉繀闇鐨勬ā鍧椼? 瀹堟姢榪涚▼鍜岀郴緇熺▼搴?br />瀹?
鎶よ繘紼嬫槸姘歌繙榪愯鍦ㄥ悗鍙扮殑紼嬪簭錛屽畠榛橀粯鍦版墽琛岃嚜宸辯殑浠誨姟銆傚父瑙佺殑瀹堟姢榪涚▼鏈?in.ftpd錛坒tp
鏈嶅姟鍣ㄥ畧鎶よ繘紼嬶級銆乮n.telnetd錛坱elnet 鏈嶅姟鍣ㄥ畧鎶よ繘紼嬶級鍜?
syslogd錛堢郴緇熸棩蹇楄褰曞畧鎶よ繘紼嬶級銆傛湁浜涘畧鎶よ繘紼嬪湪榪愯鏃朵細涓ュ瘑鐩戣閰嶇疆鏂囦歡錛屽湪閰嶇疆鏂囦歡鏀瑰彉鏃跺氨浼氳嚜鍔ㄩ噸鏂板姞杞藉畠銆備絾鏄ぇ澶氭暟瀹堟姢榪涚▼騫朵笉浼氳嚜鍔?
閲嶆柊鍔犺澆閰嶇疆鏂囦歡銆傛垜浠渶瑕佷互鏌愮鏂瑰紡鈥滃憡璇夆濊繖浜涘畧鎶よ繘紼嬮厤緗枃浠跺凡緇忚鍙戠敓浜嗘敼鍙樺茍搴旇閲嶆柊鍔犺澆銆傚彲浠ラ氳繃浣跨敤鏈嶅姟鍛戒護閲嶆柊鍚姩鏈嶅姟鏉ヨ揪鍒拌繖涓洰鐨?
錛堝湪 Red Hat Linux 緋葷粺涓婏級銆?br /> 渚嬪錛屽鏋滄垜浠洿鏀逛簡緗戠粶閰嶇疆錛屽氨闇瑕佸彂鍑猴細 service network restart銆?br /> 娉ㄦ剰錛氳繖浜涙湇鍔℃渶甯歌鐨勬槸 /etc/rc.d/init.d/* 鐩綍涓瓨鍦ㄧ殑鑴氭湰錛屽湪緋葷粺琚紩瀵兼椂鐢?init 鍚姩銆傛墍浠ワ紝鎮ㄤ篃鍙互鎵ц濡備笅鎿嶄綔鏉ラ噸鏂板惎鍔ㄦ湇鍔★細 /etc/rc.d/init.d/ start | stop | status start銆乻top 鍜?status 鏄繖浜涜剼鏈帴鍙楃殑杈撳叆鍊鹼紝鐢ㄦ潵鎵ц鎿嶄綔銆? 鐢ㄦ埛紼嬪簭 鐢?
鎴鋒垨緋葷粺紼嬪簭鍦ㄦ瘡嬈″惎鍔ㄦ椂閮戒細璇誨彇鍏墮厤緗枃浠躲傚敖綆″姝わ紝璇瘋浣忥紝鏈変簺緋葷粺紼嬪簭鍦ㄨ綆楁満鎵撳紑鏃舵儏鍐典笉涓鏍鳳紝瀹冧滑鐨勮涓轟緷璧栦簬鍦?/etc/
涓殑閰嶇疆鏂囦歡涓鍒扮殑鍐呭銆傛墍浠ワ紝鐢ㄦ埛紼嬪簭絎竴嬈″惎鍔ㄦ椂灝嗕粠 /etc/ 鐩綍涓瓨鍦ㄧ殑鏂囦歡璇誨彇緙虹渷閰嶇疆銆傜劧鍚庯紝鐢ㄦ埛鍙互閫氳繃浣跨敤 rc 鍜?
.錛堢偣錛夋枃浠舵潵瀹氬埗紼嬪簭錛屾濡備笅闈竴鑺傛墍紺恒? 鐢ㄦ埛閰嶇疆鏂囦歡錛?錛堢偣錛夋枃浠跺拰 rc 鏂囦歡 鎴戜滑宸茬粡鐪嬪埌鎬庢牱瀹規槗鍦伴厤緗▼搴忋備絾
鏄鏋滄湁鐨勪漢涓嶅枩嬈㈠湪 /etc/ 涓厤緗▼搴忕殑鏂瑰紡璇ユ庝箞鍔炲憿錛熲滄櫘閫氣濈敤鎴蜂笉鑳界畝鍗曞湴榪涘叆 /etc
鐒跺悗鏇存敼閰嶇疆鏂囦歡錛涗粠鏂囦歡緋葷粺鐨勮搴︽潵鐪嬶紝閰嶇疆鏂囦歡鐨勬墍鏈夎呮槸 root
鐢ㄦ埛錛佽繖灝辨槸澶у鏁扮敤鎴風▼搴忛兘瀹氫箟涓や釜閰嶇疆鏂囦歡鐨勫師鍥狅細絎竴涓槸鈥滅郴緇熲濈駭鍒殑錛屼綅浜?
/etc/錛涘彟涓涓睘浜庣敤鎴封滀笓鐢ㄢ濓紝鍙互鍦ㄤ粬鎴栧ス鐨勪富鐩綍涓壘鍒般?br /> 渚嬪錛屾垜鍦ㄦ垜鐨勭郴緇熶腑瀹夎浜嗛潪甯告湁鐢ㄧ殑 wget
瀹炵敤紼嬪簭銆?etc/ 涓湁涓涓?/etc/wgetrc 鏂囦歡銆傚湪鎴戠殑涓葷洰褰曚腑錛屾湁涓涓悕涓?.wgetrc
鐨勬枃浠訛紝瀹冩弿榪頒簡鎴戝畾鍒剁殑閰嶇疆錛堝彧鏈夊湪鎴戯紝涔熷氨鏄敤鎴瘋繍琛?wget
鍛戒護鏃訛紝鎵嶄細鍔犺澆榪欎釜閰嶇疆鏂囦歡錛夈傚叾瀹冪敤鎴峰湪浠栦滑鑷繁鐨勪富鐩綍錛?home/other錛変腑涔熷彲浠ユ湁 .wgetrc 鏂囦歡錛涘綋鐒訛紝鍙湁榪欎簺鐢ㄦ埛榪愯
wget 鍛戒護鏃訛紝鎵嶄細璇誨彇榪欎釜鏂囦歡銆傛崲鍙ヨ瘽璇達紝/etc/wgetrc 鏂囦歡涓?wget 鎻愪緵浜嗏滅己鐪佲濆鹼紝鑰?
/home/xxx/.wgetrc 鏂囦歡鍒椾婦浜嗘煇涓敤鎴風殑鈥滃畾鍒墮」鈥濄傞噸瑕佺殑鏄繖鍙槸鈥滀竴鑸鍒欌濓紝騫墮潪鎵鏈夋儏鍐甸兘濡傛銆備緥濡傦紝涓涓薄 pine
涓鏍風殑紼嬪簭錛屽湪 /etc/ 涓茍娌℃湁浠諱綍鏂囦歡錛屽畠鍙湪鐢ㄦ埛涓葷洰褰曚腑鏈変竴涓畾鍒墮厤緗枃浠訛紝鍚嶄負 .pinerc銆傚叾瀹冪▼搴忓彲鑳藉彧鏈?/etc/
涓殑緙虹渷閰嶇疆鏂囦歡錛岃屼笖鍙兘涓嶅厑璁哥敤鎴封滃畾鍒垛濊繖浜涢厤緗枃浠訛紙/etc 鐩綍涓彧鏈夊皯鏁?config. 鏂囦歡鏄繖縐嶆儏鍐碉級銆?br /> 閫氬父浣跨敤鐨?rc 鍜?.錛堢偣錛夋枃浠? 鏂囦歡鍚?鎻忚堪 ~/.bash_login 璇峰弬鑰冣渕an bash鈥濄傚鏋?~/.bash_profile 涓嶅瓨鍦紝bash 鍒欏皢 ~/.bash_login 浣滀負 ~/.bash_profile 澶勭悊銆? ~/.bash_logout 璇峰弬鑰冣渕an bash鈥濄傚湪閫鍑烘椂鐢?bash 鐧誨綍 shell 寮曠敤銆? ~/.bash_profile 鐢?bash 鐧誨綍 shell 寮曠敤 /etc/profile 涔嬪悗寮曠敤銆? ~/.bash_history 鍏堝墠鎵ц鐨勫懡浠ょ殑鍒楄〃銆? ~/.bashrc 璇峰弬鑰冣渕an bash鈥濄傜敱 bash 闈炵櫥褰曚氦浜掑紡 shell 寮曠敤錛堟病鏈夊叾瀹冩枃浠訛級銆傞櫎闈炶緗簡 BASH_ENV 鎴?ENV錛岄潪浜や簰寮?shell 涓嶅紩鐢ㄤ換浣曟枃浠躲? ~/.emacs 鍚姩鏃剁敱 emac 璇誨彇銆? ~/.forward 濡傛灉榪欓噷鍖呭惈涓涓數瀛愰偖浠跺湴鍧錛岄偅涔堟墍鏈夊彂寰 ~ 鐨勬墍鏈夎呯殑閭歡閮戒細琚漿鍙戝埌榪欎釜鐢靛瓙閭歡鍦板潃銆? ~/.fvwmrc ~/.fvwm2rc fvwm 鍜?fvwm2錛堝熀鏈殑 X Window 綆$悊鍣級鐨勯厤緗枃浠躲? ~/.hushlogin 璇峰弬鑰冣渕an login鈥濄傚紩璧封滄棤鎻愮ず鈥濈櫥褰曪紙娌℃湁閭歡閫氱煡銆佷笂嬈$櫥褰曚俊鎭垨鑰?MOD 淇℃伅錛夈? ~/.mail.rc 閭歡紼嬪簭鐨勭敤鎴峰垵濮嬪寲鏂囦歡銆? ~/.ncftp/
ncftp 紼嬪簭鐨勭洰褰曪紱鍖呭惈涔︾銆佹棩蹇椼佸畯銆侀閫夐」鍜岃窡韙俊鎭傝鍙傞槄 man ncftp銆俷cftp
鐨勭洰鐨勬槸涓哄洜鐗圭綉鏍囧噯鏂囦歡浼犺緭鍗忚錛圛nternet standard File Transfer
Protocol錛夋彁渚涗竴涓己澶ц岀伒媧葷殑鎺ュ彛銆傚畠鏃ㄥ湪鏇挎崲緋葷粺鎵浣跨敤鐨勬爣鍑嗙殑 ftp 紼嬪簭銆? ~/.profile 璇峰弬鑰冣渕an
bash鈥濄傚鏋?~/.bash_profile 鍜?~/.bash_login 鏂囦歡涓嶅瓨鍦紝bash 鍒欏皢 ~/.profile 浣滀負
~/.bash_profile 澶勭悊錛屽茍琚叾瀹冪戶鎵?Bourn 鐨?shell 浣跨敤銆? ~/.pinerc Pine 閰嶇疆 ~/.muttrc Mutt 閰嶇疆 ~/.exrc 榪欎釜鏂囦歡鍙互鎺у埗 vi 鐨勯厤緗? 紺轟緥錛歴et ai sm ruler 鍦ㄦ鏂囦歡涓啓鍏ヤ笂闈竴琛屼細璁?vi 璁劇疆鑷姩緙╄繘銆佸尮閰嶆嫭鍙楓佹樉紺鴻鍙峰拰琛?鍒楄繖鍑犱釜閫夐」銆? ~/.vimrc 緙虹渷鐨勨淰im鈥濋厤緗枃浠躲傚拰 .exrc 涓鏍楓? ~/.gtkrc GNOME 宸ュ叿鍖咃紙GNOME Toolkit錛夈? ~/.kderc KDE 閰嶇疆銆? ~/.netrc ftp 緙虹渷鐧誨綍鍚嶅拰瀵嗙爜銆? ~/.rhosts 鐢?r- 宸ュ叿錛堝 rsh銆乺login 絳夌瓑錛変嬌鐢ㄣ傚洜涓哄啋鍏呬富鏈哄緢瀹規槗錛屾墍浠ュ畨鍏ㄦч潪甯鎬綆銆? 蹇呴』鐢辯敤鎴鳳紙~/ 鐨勬墍鏈夎咃級鎴栬秴綰х敤鎴鋒嫢鏈夈? 鍒楀嚭涓浜涗富鏈猴紝鐢ㄦ埛鍙互浠庤繖浜涗富鏈鴻闂甯愬彿銆? 濡傛灉鏄鍙烽摼鎺ュ垯琚拷鐣ャ? ~/.rpmrc 璇峰弬闃呪渕an rpm鈥濄傚鏋?/etc/rpmrc 涓嶅瓨鍦ㄥ垯鐢?rpm 璇誨彇銆? ~/.signature 娑堟伅鏂囨湰錛屽皢鑷姩闄勫姞鍦ㄤ粠姝ゅ笎鍙峰彂鍑虹殑閭歡鏈熬銆? ~/.twmrc twm錛圱he Window Manager錛夌殑閰嶇疆鏂囦歡銆? ~/.xinitrc 鍚姩鏃剁敱 X 璇誨彇錛堣屼笉鏄敱 xinit 鑴氭湰璇誨彇錛夈傞氬父浼氬惎鍔ㄤ竴浜涚▼搴忋? 紺轟緥錛歟xec /usr/sbin/startkde 濡傛灉璇ユ枃浠朵腑瀛樺湪涓婇潰榪欒鍐呭錛岄偅涔堝湪浠庤繖涓笎鍙峰彂鍑?startx 鍛戒護鏃訛紝榪欎竴琛屽氨浼氬惎鍔ㄢ淜DE 瑙嗙獥綆$悊鍣ㄢ濓紙KDE Window Manager錛夈? ~/.xmodmaprc 姝ゆ枃浠惰浼犻佸埌 xmodmap 紼嬪簭錛岃屼笖鍙互琚懡鍚嶄負浠諱綍鏂囦歡錛堜緥濡?~/.Xmodmap 鍜?~/.keymap.km錛夈? ~/.xserverrc 濡傛灉 xinit 鍙互鎵懼埌瑕佹墽琛岀殑 X錛寈init 灝變細灝嗚鏂囦歡浣滀負 X 鏈嶅姟鍣ㄨ繍琛屻? ~/News/Sent-Message-IDs gnus 鐨勭己鐪侀偖浠跺巻鍙叉枃浠躲? ~/.Xauthority 鐢?xdm 紼嬪簭璇誨拰鍐欙紝浠ュ鐞嗘潈闄愩傝鍙傞槄 X銆亁dm 鍜?xauth 鑱旀満甯姪欏點? ~/.Xdefaults, ~/.Xdefaults-hostname 鍦ㄤ富鏈?hostname 鐨勫惎鍔ㄨ繃紼嬩腑鐢?X 搴旂敤紼嬪簭璇誨彇銆傚鏋滄壘涓嶅埌 -hostname 鏂囦歡錛屽垯鏌ユ壘 .Xdefaults 鏂囦歡銆? ~/.Xmodmap 鎸囧悜 .xmodmaprc錛汻ed Hat 鏈変嬌鐢ㄨ繖涓悕縐扮殑 .xinitrc 鏂囦歡銆? ~/.Xresources 閫氬父鏄紶閫佸埌 xrdb 浠ュ姞杞?X 璧勬簮鏁版嵁搴撶殑鏂囦歡鐨勫悕縐幫紝鏃ㄥ湪閬垮厤搴旂敤紼嬪簭闇瑕佽鍙栦竴涓緢闀跨殑 .Xdefaults 鏂囦歡榪欐牱鐨勬儏鍐點傦紙鏈変簺鎯呭喌鏇劇粡浣跨敤浜?~/.Xres銆傦級 ~/mbox 鐢ㄦ埛鐨勬棫閭歡銆? 鍙傝冭祫鏂? 瑕佷簡瑙f洿澶氫俊鎭紝璇烽槄璇?Jack Wallen, Jr. 鐨?Linux configuration files銆?br /> 鍦?developerWorks 涓婅繕鏈夛細 Technical FAQ for Linux users What good is a Linux client? Using the xinetd program for system administration 嫻佽 developerWorks 涓婄殑鏇村 Linux 鍙傝冭祫鏂欍?br /> 嫻佽 developerWorks 涓婄殑鏇村寮鏀炬簮浠g爜鍙傝冭祫鏂欍?nbsp; 鏂囩珷鏉ユ簮:http://my.donews.com/robinchow/2007/01/10/fbucnsfniuesfiidxfmikaeigzppejtjlomy/ ]]> 青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品
欧美成人精品h版在线观看 |
久久精品人人做人人综合 |
鲁大师影院一区二区三区 |
国产一区二区在线观看免费播放 |
亚洲韩日在线 |
亚洲国产精品一区二区久 |
久久夜色精品国产欧美乱 |
国内一区二区在线视频观看
|
午夜精品99久久免费 |
国产精品久久久久免费a∨大胸
|
国产精品视频xxx |
午夜精品美女自拍福到在线 |
亚洲欧美日韩国产综合在线 |
国产亚洲欧美一区 |
米奇777在线欧美播放 |
麻豆久久久9性大片 |
激情综合视频 |
亚洲国产精品精华液网站 |
欧美日韩国产bt |
欧美亚洲在线观看 |
久久人人爽国产 |
亚洲视频电影图片偷拍一区 |
亚洲一区二区日本 |
亚洲第一色中文字幕 |
亚洲区国产区 |
国产欧美日韩91 |
欧美大片免费久久精品三p |
欧美日韩国产小视频 |
欧美一区二区三区精品电影 |
久久久久久婷 |
亚洲一区日本 |
久久躁狠狠躁夜夜爽 |
亚洲无线一线二线三线区别av |
亚洲欧美日本伦理 |
亚洲日本欧美天堂 |
亚洲欧美激情在线视频 |
91久久精品一区 |
午夜精品免费在线 |
日韩一级免费观看 |
久久激五月天综合精品 |
亚洲无限乱码一二三四麻 |
久久精品在线 |
亚洲在线日韩 |
欧美黑人一区二区三区 |
久久免费99精品久久久久久 |
欧美日韩黄色大片 |
欧美国产日韩一区二区在线观看 |
国产精品久久久久久久久动漫
|
日韩一区二区电影网 |
欧美一区二区三区免费观看 |
中文av一区二区 |
狼人社综合社区 |
久久久国产一区二区 |
国产精品二区二区三区 |
91久久在线视频 |
在线欧美不卡 |
欧美在线视频日韩 |
午夜一区二区三视频在线观看 |
欧美国产精品 |
欧美成人激情视频 |
国产综合在线看 |
欧美亚洲综合久久 |
久久av一区二区三区亚洲 |
欧美色图五月天 |
亚洲欧洲综合 |
亚洲精品美女在线 |
嫩草国产精品入口 |
亚洲第一在线 |
亚洲国产成人在线播放 |
久久久久国产免费免费 |
久久久久99精品国产片 |
国产日韩欧美一区在线 |
午夜精品久久久久影视 |
欧美在线free |
国产亚洲成精品久久 |
欧美一站二站 |
老妇喷水一区二区三区 |
伊人精品成人久久综合软件 |
久久精品视频免费播放 |
欧美a级大片 |
亚洲国产视频一区 |
欧美岛国在线观看 |
亚洲免费福利视频 |
亚洲欧美视频在线 |
国产婷婷色一区二区三区在线
|
亚洲国产欧美久久 |
亚洲最新视频在线播放 |
欧美精品国产精品日韩精品 |
亚洲久久成人 |
欧美一区二区三区免费视 |
国产毛片精品视频 |
久久久久国产成人精品亚洲午夜 |
欧美成人嫩草网站 |
99国产精品久久久久老师 |
国产精品va |
久久9热精品视频 |
欧美高清在线 |
亚洲一区一卡 |
国产自产在线视频一区 |
免费亚洲电影在线观看 |
亚洲精品在线免费 |
欧美在线一二三四区 |
亚洲第一精品夜夜躁人人爽 |
欧美剧在线免费观看网站 |
亚洲一二三四区 |
欧美不卡在线视频 |
亚洲一区二区三区午夜 |
国模大胆一区二区三区 |
欧美精品一区在线发布 |
亚洲欧美日韩精品一区二区 |
农村妇女精品 |
性18欧美另类 |
亚洲精品护士 |
国内精品久久久久影院色 |
欧美极品在线视频 |
欧美在线免费 |
亚洲免费观看高清在线观看
|
亚洲综合电影 |
136国产福利精品导航网址 |
欧美日韩亚洲在线 |
开心色5月久久精品 |
亚洲婷婷在线 |
日韩视频免费在线 |
蜜桃久久精品乱码一区二区 |
亚洲女同精品视频 |
亚洲精品一区二 |
韩国av一区二区三区 |
国产精品第十页 |
欧美精品在线视频 |
免费观看成人网 |
久久精品国产欧美激情 |
亚洲影音先锋 |
99re热精品 |
亚洲精品欧美极品 |
欧美国产91 |
欧美国产日韩a欧美在线观看 |
久久国产精品一区二区三区四区 |
一区二区av在线 |
亚洲国产精品99久久久久久久久 |
国产偷自视频区视频一区二区 |
欧美体内谢she精2性欧美 |
欧美激情女人20p |
欧美ab在线视频 |
欧美18av |
欧美福利精品 |
欧美大片免费观看在线观看网站推荐 |
久久国产精品99国产 |
久久福利电影 |
久久国产精品99国产精 |
欧美一区二区成人6969 |
欧美一级视频精品观看 |
亚洲欧美日韩国产一区 |
亚洲欧美在线另类 |
亚洲一区二区在线观看视频 |
亚洲视频每日更新 |
亚洲专区欧美专区 |
亚洲主播在线 |
久久精品国产第一区二区三区 |
欧美影院视频 |
久久久www成人免费精品 |
久久精品亚洲精品 |
久久亚洲精品网站 |
乱人伦精品视频在线观看 |
蜜桃av一区 |
欧美日韩国产黄 |
欧美日韩一区二区视频在线观看 |
欧美日韩中文精品 |
国产精品久久久一区二区三区 |
国产精品久久久久久久久久久久 |
国产精品久久7 |
国产欧美日韩综合精品二区 |
激情视频一区二区三区 |
亚洲激情一区二区 |
亚洲一区二区三区在线播放 |
性欧美激情精品 |
免费不卡中文字幕视频 |
亚洲人成在线播放网站岛国 |
中文精品视频 |
久久免费国产精品 |
欧美视频一区二区三区在线观看 |
国产精品欧美久久 |
影音先锋亚洲电影 |
一区二区三区久久精品 |
久久久91精品国产 |
亚洲激情黄色 |
午夜在线视频观看日韩17c |
久久午夜激情 |
国产精品视频自拍 |
亚洲欧洲日本mm |
亚洲欧美日韩中文播放 |
欧美成人首页 |
亚洲午夜国产一区99re久久 |
久久性天堂网 |
国产麻豆视频精品 |
日韩午夜av |
女人香蕉久久**毛片精品 |
99热这里只有精品8 |
久久综合色婷婷 |
国产视频久久 |
亚洲午夜av |