תÌù£º
°²×°ºÃÁËUnix/LinuxÀà²Ù×÷ϵͳ£¬È´²»ÖªµÀÄÃËü×öµãʲô¡¢Ò²²»ÖªµÀËüÄÜ×öЩʲô¡¡ÕâÊÇ´ó¶àÊý³õÕâÅóÓѵÄÒÉ»ó¡£
ÎÒÈÏΪÊ×ÏÈÒª×öµÄÊÇѧ»áÈçºÎÔÚUnix/LinuxÏ»ñµÃ֪ʶ£¬ÕÆÎÕѧϰ·½·¨¡£ÈçºÎÕæÓÐÒ»ÌìÄãÒªÓÃLinuxÀ´×öµãʲôʱ¾õµÃ¹ÂÁ¢ÎÞÖú£¬ÄãÒ»¶¨ÒªÑ§»áÓÃmanÃüÁî¡£
manÊÇʲô£¿
Ê×ÏÈÔÚÃüÁîÐÐÊäÈëman man»Ø³µ¿´Ò»Ï°ɡ£°ÑNAMEºÍDESCRIPTIONÄÇÁ½¶ÎÓ¢ÎÄ¿´ÍêÁËÄã¾ÍÃ÷°×ÁË¡£manÊÇÏÔʾUnix/LinuxµÄÔÚÏßÊÖ²áµÄÃüÁî¡£
µäÐÍÇé¿öÏ£¬manÊÇÓÃÀ´²é¿´Ò»Ð©ÃüÁî¡¢º¯Êý»òÎļþµÄ°ïÖúÊÖ²áµÄ£¬ÁíÍâËü»¹¿ÉÒÔÏÔʾһЩgzipѹËõ¸ñʽµÄÎļþ¡£
Unix/LinuxµÄÔÚÏßÊÖ²áÊÇʲô£¿
Ò»°ãÇé¿öÏÂLinuxÏÂËùÓÐ×ÊÔ´¶¼»áËæ²Ù×÷ϵͳһÆð·¢ÐУ¬°üÀ¨ÄÚºËÔ´´úÂë¡£¶øÔÚÏßÊÖ²áÊDzÙ×÷ϵͳËùÓÐ×ÊÔ´µÄÒ»±¾ºÜºÃµÄʹÓÃÊֲᡣÄãÓ⻶®µÄÃüÁîʱ¿ÉÒÔmanÒ»ÏÂÕâ¸öÃüÁд³ÌÐòʱÓв»»áÓõĺ¯Êýʱ¿ÉÒÔmanһϸú¯Êý£¬ÉõÖÁÄã²»¶®Ä³¸öÎļþʱ¶¼¿ÉÒÔmanÒ»ÏÂÕâ¸öÎļþ£¨µ±È»£¬Õâ¸öÎļþÒ»°ãÀ´ËµÊÇϵͳÓõ½µÄÒ»¸öÅäÖÃÎļþ»òij¸öϵͳ·þÎñÓõ½µÄÅäÖÃÎļþ£©¡£
manÊÖ²á×ÊÔ´µÄλÖÃ
Ò»°ãÇé¿öÏÂmanµÄ×ÊÔ´Ö÷ҪλÓÚ/usr/share/manĿ¼ÏÂÃæ¡£µ«Èç¹ûÄã×Ðϸ¿´ÁËman manµÄ½á¹û£¬²¢ÇÒ¶Ôman.configÒ²¸ÐÐËȤ²¢ÇÒman man.config¹ýºó£¬Äã¾Í»áÃ÷°×ÆäλÖÃÊÇÓÉMANPATH±äÁ¿¾ö¶¨µÄ£¬Äã¿ÉÒÔmore /etc/man.configÀ´¿´ÓÐÄÄЩµØ·½ÓÐmanÄÚÈݵÄλÖá£
µ¥¸öman×ÊÔ´ÄÚÈݵÄ×é³É
Ò»°ãÀ´Ëµ£¬manÄÚÈÝ»á·ÖΪNAME¡¢SYNOPSIS¡¢DESCRIPTION¡¢OPTIONS¡¢SEE ALSO¡¢BUGSµÈ²¿·Ö¡£NAMEÊǸÃÄÚÈݵÄÒ»¸ö¼òµ¥ËµÃ÷£¨Ò»°ãÊÇÒ»¾ä»°¸ø¸ö¶¨ÒåËƵģ©£»SYNOPSISÊÇ´óÖÂ˵Ã÷£¬¶ÔÓÚÃüÁîÀ´ËµÊÇÃüÁîµÄÓï·¨£¬¶ÔÓÚº¯ÊýÀ´ËµÊǺ¯ÊýµÄ¶¨Ò壻DESCRIPTIONÊǸÃÄÚÈݵÄÒ»¸ö¼òÃ÷½éÉÜ£¬ÈÃÄã¶ÔÄã²éµÄÄÚÈÝ´óÖÂÓиöÓ¡Ïó£»OPTIONSÊÇÔÚ²éѯÃüÁîʱµÄÃüÁî²ÎÊýµÄÏêϸ½âÊÍ£»SEE ALSOÊǸøÄãһЩÌáʾ£¬Ï൱ÓÚ½éÉÜÄãһЩ²Î¿¼ÄÚÈÝ£»BUGSÊÇÖ¸Ã÷¸ÃÃüÁî»òº¯Êý´æÔÚʲôBUG£¬ÌáÐÑÄã·ÀÖ¹³öÏÖ¡£
man×ÊÔ´µÄ×é³É
ÓкܶàÅóÓÑ˵man×ÊÔ´·ÖΪ8Õ£¬ÎÒ¾õµÃÕâÖ»ÊÇ˵ÁËÖ÷Òª²¿·Ö£¬Äãls /usr/share/man¿´Ò»Ï¾ÍÖªµÀÁË£¬ÓÐman1¡¢man2¡¡man7¡¢man8ÕâÑù8¸öĿ¼´æÔÚÄØ£¬µ«³ýÁËÕâÖ®Í⻹ÓÐÆäËüµÄĿ¼°¡£¬ºÎ¿ö»¹ÓÐÆäËüµÄMANPATH¹æ¶¨µÄĿ¼ÄØ¡£ËùÒÔ¾ßÌå¶àÉÙÕ²»Êǹ̶¨µÄ£¬µ«LinuxÏ´óÖÂÏàͬÄÚÈݵĻá¹éÔÚͬһ¸öĿ¼Ï£¬±ÈÈçman1ºÍman2Ŀ¼ËùÔڵĴóÖÂÊÇһЩϵͳÃüÁ¶øman3ÊDZà³ÌʱµÄһЩº¯ÊýµÄÓ÷¨£¬man5ÊÇЩÅäÖÃÎļþÊÖ²áËùÔÚµÄĿ¼¡¡Í¬ÑùÔÚ/usr/X11R*/manĿ¼ÏÂÒ²ÓÐһЩĿ¼¡£¾ßÌåÊÇ°´Ê²Ã´À´·ÖĿ¼µÄÄØ£¿¸÷È˾ßÌå¸ù¾Ý¸÷Ŀ¼µÄÄÚÈÝÀí½â²»Í¬ÁË¡£
man×ÊÔ´µÄʹÓü¼ÇÉ
1¡¢Èç¹ûÄãÔÚMANPATH±äÁ¿ËùÉ趨µÄĿ¼£¨±ÈÈç/usr/share/man/man1Ŀ¼£©Àï¿´µ½Ò»¸öln.1.gzµÄÎļþ£¬ÄÇôÄã¾Í¿ÉÒÔman lnÀ´²é¿´fileameµ½µ×ÊǸöʲôÃüÁîÁË¡£
2¡¢manµÄÒ»°ãÓ÷¨ÊÇman SECTION name£¬¼´ÔÚÖ¸¶¨µÄÕ½ڣ¨SECTION£©Àï²é¿´nameÃüÁî»òº¯ÊýµÄÓ÷¨¡£µ«Èç¹ûÄã²»ÖªµÀij¸öÃüÁî»òº¯ÊýÔÚÄÄÒ»Õ£¬Äã¿ÉÒÔman -a nameÕâÑùÔÚËùÓÐMANPATHÉ趨µÄµØ·½²é¿´nameµÄÊֲᡣĬÈÏÇé¿öÏÂmanÊÇÏÔʾÍêµÚÒ»¸öÊÖ²áÒ³ºó¾Í»áÍ˳ö£¬Èç¹ûÓÐ-a²ÎÊý¾Í»áËÑË÷ËùÓеÄ×ÊÔ´ÁË¡£
3¡¢Èç¹ûÄã¾õµÃÔÚLinuxÏ¿´Ì«À§ÄÑ»òÕßÄãÓ¢ÎIJ»Ì«ºÃÏëÒª½èÖú¡°XX´Ê°Ô¡±»ò¡°XX¿ìÒ롱À´°ï棬ÄÇôÄã¿ÉÒÔÏÈ°ÑmanÊÖ²á´æ³ÉÎı¾ÎļþÈ»ºóftp»òsamba¹²Ïíµ½windowsÏ´ò¿ªÀ´¿´°É¡£Ê¹ÓÃÕâô¸öÃüÁî¾ÍÐÐÁË£º
man man | col -bfp > man.txt
°ÑmanÊÖ²áÉú³ÉÁËÒ»¸öman.txtÎļþÁË£¬½èÖú·Ò빤¾ßÀ´¿´°É
4¡¢±àд×Ô¼ºµÄman×ÊÔ´£¬Èç¹ûÄã×Ô¼ºÐ´ÁËÒ»¸ö·Ç³£ºÃµÄº¯Êý»òÃüÁî¼Óµ½ÏµÍ³ÁË£¬±ÈÈçÄãдÁËÒ»¸öMyDateÃüÁîÀ´ÏÔʾÄãÐèÒªµÄ¸ñʽÈÕÆÚ£¬ÄÇÄãÒ²¿ÉÒÔΪÄãµÄMyDateÃüÁîÀ´Ð´¸öÊֲᡣºÜ¼òµ¥£¬Äã±à¼£¨ÓÃvi»òÆäËüÈκÎÎı¾±à¼¹¤¾ß¶¼¿ÉÒÔ£©Ò»¸öMyDateÎļþ£¬ÀïÃæÊÇÄãµÄÃüÁîʹÓ÷½·¨ËµÃ÷£¬È»ºóÓÃgzip MyDateÃüÁî°ÑÕâÊÖ²áѹËõÒ»ÏÂÉú³ÉÒ»¸öMyDate.gz£¬È»ºó°ÑÕâ¸öÎļþcopyµ½Ä³¸öMANPATHÖ¸¶¨µÄĿ¼£¬±ÈÈçcp MyDate.gz /usr/share/man/man2£¬ÒÔºóÄã¾Í¿ÉÒÔman MyDateÀ´²é¿´ÄãµÄÃüÁîʹÓ÷½·¨ÁË¡£
5¡¢°²×°ºÃÒ»¸öLinux²Ù×÷ϵͳºóÄÜ×öʲôÄØ£¿ÄãҪѧϵͳ¹ÜÀí£¿¾Í°Ñ/usr/share/man1ºÍ/usr/share/man2Ŀ¼ÀïµÄËùÓÐÃüÁmanһϰɣ¬¶¼ÕÆÎÕÁËÄã¾ø¶ÔÊÇϵͳ¹ÜÀíר¼ÒÁË£¡ÏëҪѧC±à³Ì£¿manÒ»ÏÂgcc¡¢g++¡¢gdbµÈÃüÁî¡£»òÕßÄãlsһϸ÷¸öbinĿ¼£¬±ÈÈç/usr/bin¡¢/bin¡¢/sbinµÈ£¬È»ºóÒÀ´ÎmanÒ»ÏÂÄãËù¿´µ½µÄ°É¡£
ѧϰLinux×î´óµÄ×ÊÔ´ÔÚÄãµçÄÔÉÏ£¬Èç¹ûÄãû°²×°£¬ÔÚÄãµÄ¹âÅÌÉÏÒ»¶¨ÓС£ÏëҪѧÄÚºËÂ𣿸ϿìÈ¥¿´¿´/usr/src/linux*Ŀ¼ÏÂÃæµÄËùÓж«Î÷°É¡£