[教学]彩色的man pages,让你寻找帮助时也赏心悦目
初学者园地
您没有权限查看这个主题的附件。
作者: gnix_oag 发布时间: 2006-03-13
作者: linnet9999 发布时间: 2006-03-13
显示为乱码
下载源码 http://download.sf.linuxforum.net/cmpp/ ... 1.5.tar.gz
解压:
编译
make
复制到系统
sudo cp -r UTF-8/* /usr/share/man/zh_CN/
修改配置文件
把里面的所有的 /usr/share/man 改成 /usr/share/man/zh_CN
为了使用中文 man 里没有的 e文 man ,建义:
把里面的所有的 /usr/share/man 的行改成 /usr/share/man/zh_CN 后,加再前面。
再试试:
man mount
man grub
.
最后由 gnix_oag 编辑于 2006-04-09 23:52,总共编辑了 3 次
作者: gnix_oag 发布时间: 2006-03-14
#
# This file is used by the man-db package to configure the man and cat paths.
# It is also used to provide a manpath for those without one by examining
# their PATH environment variable. For details see the manpath(5) man page.
#
# Lines beginning with `#' are comments and are ignored. Any combination of
# tabs or spaces may be used as `whitespace' separators.
#
# There are three mappings allowed in this file:
# --------------------------------------------------------
# MANDATORY_MANPATH manpath_element
# MANPATH_MAP path_element manpath_element
# MANDB_MAP global_manpath [relative_catpath]
#---------------------------------------------------------
# every automatically generated MANPATH includes these fields
#
#MANDATORY_MANPATH /usr/src/pvm3/man
#
MANDATORY_MANPATH /usr/man
MANDATORY_MANPATH /usr/share/man/zh_CN
MANDATORY_MANPATH /usr/share/man
MANDATORY_MANPATH /usr/X11R6/man
MANDATORY_MANPATH /usr/local/man
#---------------------------------------------------------
# set up PATH to MANPATH mapping
# ie. what man tree holds man pages for what binary directory.
#
# *PATH* -> *MANPATH*
#
MANPATH_MAP /bin /usr/share/man/zh_CN
MANPATH_MAP /bin /usr/share/man
MANPATH_MAP /usr/bin /usr/share/man/zh_CN
MANPATH_MAP /usr/bin /usr/share/man
MANPATH_MAP /sbin /usr/share/man/zh_CN
MANPATH_MAP /sbin /usr/share/man
MANPATH_MAP /usr/sbin /usr/share/man/zh_CN
MANPATH_MAP /usr/sbin /usr/share/man
MANPATH_MAP /usr/local/bin /usr/local/man
MANPATH_MAP /usr/local/bin /usr/local/share/man
MANPATH_MAP /usr/local/sbin /usr/local/man
MANPATH_MAP /usr/local/sbin /usr/local/share/man
MANPATH_MAP /usr/X11R6/bin /usr/X11R6/man
MANPATH_MAP /usr/bin/X11 /usr/X11R6/man
MANPATH_MAP /usr/games /usr/share/man/zh_CN
MANPATH_MAP /usr/games /usr/share/man
MANPATH_MAP /opt/bin /opt/man
MANPATH_MAP /opt/sbin /opt/man
#---------------------------------------------------------
# For a manpath element to be treated as a system manpath (as most of those
# above should normally be), it must be mentioned below. Each line may have
# an optional extra string indicating the catpath associated with the
# manpath. If no catpath string is used, the catpath will default to the
# given manpath.
#
# You *must* provide all system manpaths, including manpaths for alternate
# operating systems, locale specific manpaths, and combinations of both, if
# they exist, otherwise the permissions of the user running man/mandb will
# be used to manipulate the manual pages. Also, mandb will not initialise
# the database cache for any manpaths not mentioned below unless explicitly
# requested to do so.
#
# In a per-user configuration file, this directive only controls the
# location of catpaths and the creation of database caches; it has no effect
# on privileges.
#
# Any manpaths that are subdirectories of other manpaths must be mentioned
# *before* the containing manpath. E.g. /usr/man/preformat must be listed
# before /usr/man.
#
# *MANPATH* -> *CATPATH*
#
MANDB_MAP /usr/man /var/cache/man/fsstnd
MANDB_MAP /usr/share/man/zh_CN /var/cache/man
MANDB_MAP /usr/local/man /var/cache/man/oldlocal
MANDB_MAP /usr/local/share/man /var/cache/man/local
MANDB_MAP /usr/X11R6/man /var/cache/man/X11R6
MANDB_MAP /opt/man /var/cache/man/opt
#
#---------------------------------------------------------
# Program definitions. These are commented out by default as the value
# of the definition is already the default. To change: uncomment a
# definition and modify it.
#
#DEFINE pager /usr/bin/pager -s
#DEFINE cat /bin/cat
#DEFINE tr /usr/bin/tr '\255\267\264\327' '\055\157\047\170'
#DEFINE grep /bin/grep
#DEFINE troff /usr/bin/groff -mandoc
#DEFINE nroff /usr/bin/nroff -mandoc
#DEFINE eqn /usr/bin/eqn
#DEFINE neqn /usr/bin/neqn
#DEFINE tbl /usr/bin/tbl
#DEFINE col /usr/bin/col
#DEFINE vgrind /usr/bin/vgrind
#DEFINE refer /usr/bin/refer
#DEFINE grap /usr/bin/grap
#DEFINE pic /usr/bin/pic -S
#
#DEFINE decompressor /bin/gzip -dc
#DEFINE compressor /bin/gzip -c7
#---------------------------------------------------------
# Misc definitions: same as program definitions above.
#
#DEFINE whatis_grep_flags -i
#DEFINE apropos_grep_flags -iEw
#DEFINE apropos_regex_grep_flags -iE
#---------------------------------------------------------
# Section names. Manual sections will be searched in the order listed here;
# the default is 1, n, l, 8, 3, 2, 5, 4, 9, 6, 7. Multiple SECTION
# directives may be given for clarity, and will be concatenated together in
# the expected way.
# If a particular extension is not in this list (say, 1mh), it will be
# displayed with the rest of the section it belongs to. The effect of this
# is that you only need to explicitly list extensions if you want to force a
# particular order. Sections with extensions should usually be adjacent to
# their main section (e.g. "1 1mh 8 ...").
SECTION 1 n l 8 3 2 3posix 3pm 3perl 5 4 9 6 7
最后由 gnix_oag 编辑于 2006-03-15 23:37,总共编辑了 3 次
作者: gnix_oag 发布时间: 2006-03-14
作者: 内存不足 发布时间: 2006-03-14
作者: eexpress 发布时间: 2006-03-14
但gnix.oag好像少写了一步
sudo mkdir /usr/share/man/zh_CN
我系统里本身没有/usr/share/man/zh_CN这个目录
您没有权限查看这个主题的附件。
作者: 内存不足 发布时间: 2006-03-14
你是最少化安装的吧
作者: gnix_oag 发布时间: 2006-03-14
作者: eexpress 发布时间: 2006-03-14
系统之标准安装的。man也是按照你上边做的
作者: 内存不足 发布时间: 2006-03-14
make 后就在当前目录产生 UTF-8 文件夹,不影响系统的。
作者: gnix_oag 发布时间: 2006-03-14
作者: reinchii 发布时间: 2006-03-14
很简单的 照着做就OK 了
作者: 内存不足 发布时间: 2006-03-14
可以做为参考资料。。
作者: abel0450 发布时间: 2006-03-14
作者: youokma 发布时间: 2006-03-14
to eexpress 其实这个make并不是编译任何东西,只是像gnix_oag说的那样,就是一个命令,生成一个UTF8目录而已,
DESTDIR=/usr/share
CONFDIR=/etc
TRANSLATED=DOCS/00TRANSLATED
MAN=1 1p 8 2 3 3p 4 5 6 7 9 0p tcl n l p o 3pm 3perl
MAN=1 8 2 3 4 5 6 7 9 n l
u8:
mkdir UTF-8
cp -r src/man* UTF-8/
gb:
for i in $(MAN) ; do \
mkdir -p GB/man$$i ; \
done
for f in `cat $(TRANSLATED)` ; do \
iconv -f utf8 -t gb18030 src/$$f > GB/$$f ; \
done
cp src/man.macros GB/
....
作者: the_owl 发布时间: 2006-03-14
作者: gnix_oag 发布时间: 2006-03-15
作者: eexpress 发布时间: 2006-03-16
本来就是 目标判断+bash
作者: gnix_oag 发布时间: 2006-03-16
好啊
作者: gnix_oag 发布时间: 2006-03-16
作者: eexpress 发布时间: 2006-03-16
作者: yang119345 发布时间: 2006-03-16
我之前安装过manpages-zh
然后按照楼主方法,不能成功
--------
man1 man2 man3 man4 man5 man6 man7 man8 man9 manl man.macros mann
username@colinux:/usr/share/man$ ls zh_CN.ori
man1 man2 man3 man4 man5 man6 man7 man8 man9
username@colinux:/usr/share/man$ ls zh_CN.ori/man8
badblocks.8.gz groupadd.8.gz lilo.8.gz nmbd.8.gz rootflags.8.gz smbspool.8.gz usermod.8.gz
bdflush.8.gz groupdel.8.gz losetup.8.gz ntsysv.8.gz route.8.gz smbumount.8.gz vidmode.8.gz
blockdev.8.gz groupmod.8.gz lspci.8.gz ping.8.gz rpm.8.gz svnserve.8.gz vmstat.8.gz
chat.8.gz halt.8.gz mailstats.8.gz pppd.8.gz setclock.8.gz swapoff.8.gz xinetd.8.gz
chpasswd.8.gz hdparm.8.gz MAKEDEV.8.gz printcap.8.gz setquota.8.gz swapon.8.gz zdump.8.gz
convertquota.8.gz ifconfig.8.gz makemap.8.gz quotacheck.8.gz setserial.8.gz swat.8.gz zic.8.gz
cron.8.gz imapd.8.gz mingetty.8.gz quotaoff.8.gz showmount.8.gz sync.8.gz
dmesg.8.gz inetd.8.gz mkfs.8.gz quotaon.8.gz shutdown.8.gz tcpdump.8.gz
edquota.8.gz init.8.gz mkswap.8.gz quotastats.8.gz smbd.8.gz tzselect.8.gz
exportfs.8.gz iptables.8.gz modinfo.8.gz ramsize.8.gz smbmnt.8.gz umount.8.gz
fdisk.8.gz iptables-restore.8.gz named-bootconf.8.gz rdev.8.gz smbmount.8.gz useradd.8.gz
fsck.8.gz iptables-save.8.gz netstat.8.gz repquota.8.gz smbpasswd.8.gz userdel.8.gz
username@colinux:/usr/share/man$ ls zh_CN/man8
ls: zh_CN/man8: 权限不够
username@colinux:/usr/share/man$ sudo ls zh_CN/man8
badblocks.8 exportfs.8 init.8 mingetty.8 printcap.8 rpm.8 smbmnt.8 tzselect.8
bdflush.8 fdisk.8 iptables.8 mkfs.8 quotacheck.8 rpmbuild.8 smbmount.8 umount.8
blockdev.8 fsck.8 iptables-restore.8 mkswap.8 quotaoff.8 rpmcache.8 smbpasswd.8 useradd.8
chat.8 groupadd.8 iptables-save.8 modinfo.8 quotaon.8 rpmdeps.8 smbspool.8 userdel.8
chpasswd.8 groupdel.8 lilo.8 mount.8 quotastats.8 rpmgraph.8 smbumount.8 usermod.8
convertquota.8 groupmod.8 logrotate.8 named-bootconf.8 ramsize.8 setclock.8 svnserve.8 vidmode.8
cron.8 halt.8 losetup.8 netstat.8 rdev.8 setquota.8 swapoff.8 vmstat.8
crond.8 hdparm.8 lspci.8 nmbd.8 repquota.8 setserial.8 swapon.8 xinetd.8
CVS ifconfig.8 mailstats.8 ntsysv.8 rootflags.8 showmount.8 swat.8 zdump.8
dmesg.8 imapd.8 MAKEDEV.8 ping.8 route.8 shutdown.8 sync.8 zic.8
edquota.8 inetd.8 makemap.8 pppd.8 rpm2cpio.8 smbd.8 tcpdump.8
username@colinux:/usr/share/man$ locale
LANG=zh_CN.UTF-8
LC_CTYPE="zh_CN.UTF-8"
LC_NUMERIC="zh_CN.UTF-8"
LC_TIME="zh_CN.UTF-8"
LC_COLLATE="zh_CN.UTF-8"
LC_MONETARY="zh_CN.UTF-8"
LC_MESSAGES="zh_CN.UTF-8"
LC_PAPER="zh_CN.UTF-8"
LC_NAME="zh_CN.UTF-8"
LC_ADDRESS="zh_CN.UTF-8"
LC_TELEPHONE="zh_CN.UTF-8"
LC_MEASUREMENT="zh_CN.UTF-8"
LC_IDENTIFICATION="zh_CN.UTF-8"
LC_ALL=
username@colinux:/usr/share/man$ man mount
No manual entry for mount
See 'man 7 undocumented' for help when manual pages are not available.
username@colinux:/usr/share/man$
作者: ynzheng 发布时间: 2006-03-16
#
# This file is used by the man-db package to configure the man and cat paths.
# It is also used to provide a manpath for those without one by examining
# their PATH environment variable. For details see the manpath(5) man page.
#
# Lines beginning with `#' are comments and are ignored. Any combination of
# tabs or spaces may be used as `whitespace' separators.
#
# There are three mappings allowed in this file:
# --------------------------------------------------------
# MANDATORY_MANPATH manpath_element
# MANPATH_MAP path_element manpath_element
# MANDB_MAP global_manpath [relative_catpath]
#---------------------------------------------------------
# every automatically generated MANPATH includes these fields
#
#MANDATORY_MANPATH /usr/src/pvm3/man
#
MANDATORY_MANPATH /usr/man
#MANDATORY_MANPATH /usr/share/man
MANDATORY_MANPATH /usr/share/man/zh_CN
#MANDATORY_MANPATH /usr/share/man
MANDATORY_MANPATH /usr/X11R6/man
MANDATORY_MANPATH /usr/local/man
#---------------------------------------------------------
# set up PATH to MANPATH mapping
# ie. what man tree holds man pages for what binary directory.
#
# *PATH* -> *MANPATH*
#
#MANPATH_MAP /bin /usr/share/man
MANPATH_MAP /bin /usr/share/man/zh_CN
#MANPATH_MAP /bin /usr/share/man
#MANPATH_MAP /usr/bin /usr/share/man
MANPATH_MAP /usr/bin /usr/share/man/zh_CN
#MANPATH_MAP /usr/bin /usr/share/man
#MANPATH_MAP /sbin /usr/share/man
MANPATH_MAP /sbin /usr/share/man/zh_CN
#MANPATH_MAP /sbin /usr/share/man
#MANPATH_MAP /usr/sbin /usr/share/man
MANPATH_MAP /usr/sbin /usr/share/man/zh_CN
#MANPATH_MAP /usr/sbin /usr/share/man
MANPATH_MAP /usr/local/bin /usr/local/man
MANPATH_MAP /usr/local/bin /usr/local/share/man
MANPATH_MAP /usr/local/sbin /usr/local/man
MANPATH_MAP /usr/local/sbin /usr/local/share/man
MANPATH_MAP /usr/local/sbin /usr/local/man
MANPATH_MAP /usr/X11R6/bin /usr/X11R6/man
MANPATH_MAP /usr/bin/X11 /usr/X11R6/man
#MANPATH_MAP /usr/games /usr/share/man
MANPATH_MAP /usr/games /usr/share/man/zh_CN
#MANPATH_MAP /usr/games /usr/share/man
MANPATH_MAP /opt/bin /opt/man
MANPATH_MAP /opt/sbin /opt/man
#---------------------------------------------------------
# For a manpath element to be treated as a system manpath (as most of those
# above should normally be), it must be mentioned below. Each line may have
# an optional extra string indicating the catpath associated with the
# manpath. If no catpath string is used, the catpath will default to the
# given manpath.
#
# You *must* provide all system manpaths, including manpaths for alternate
# operating systems, locale specific manpaths, and combinations of both, if
# they exist, otherwise the permissions of the user running man/mandb will
# be used to manipulate the manual pages. Also, mandb will not initialise
# the database cache for any manpaths not mentioned below unless explicitly
# requested to do so.
#
# In a per-user configuration file, this directive only controls the
# location of catpaths and the creation of database caches; it has no effect
# on privileges.
#
# Any manpaths that are subdirectories of other manpaths must be mentioned
# *before* the containing manpath. E.g. /usr/man/preformat must be listed
# before /usr/man.
#
# *MANPATH* -> *CATPATH*
#
MANDB_MAP /usr/man /var/cache/man/fsstnd
#MANDB_MAP /usr/share/man /var/cache/man
MANDB_MAP /usr/share/man/zh_CN /var/cache/man
#MANDB_MAP /usr/share/man /var/cache/man
MANDB_MAP /usr/local/man /var/cache/man/oldlocal
MANDB_MAP /usr/local/share/man /var/cache/man/local
MANDB_MAP /usr/X11R6/man /var/cache/man/X11R6
MANDB_MAP /opt/man /var/cache/man/opt
#
#---------------------------------------------------------
# Program definitions. These are commented out by default as the value
# of the definition is already the default. To change: uncomment a
# definition and modify it.
#
#DEFINE pager /usr/bin/pager -s
#DEFINE cat /bin/cat
#DEFINE tr /usr/bin/tr '\255\267\264\327' '\055\157\047\170'
#DEFINE grep /bin/grep
#DEFINE troff /usr/bin/groff -mandoc
#DEFINE nroff /usr/bin/nroff -mandoc
#DEFINE eqn /usr/bin/eqn
#DEFINE neqn /usr/bin/neqn
#DEFINE tbl /usr/bin/tbl
#DEFINE col /usr/bin/col
#DEFINE vgrind /usr/bin/vgrind
#DEFINE refer /usr/bin/refer
#DEFINE grap /usr/bin/grap
#DEFINE pic /usr/bin/pic -S
#
#DEFINE decompressor /bin/gzip -dc
#DEFINE compressor /bin/gzip -c7
#---------------------------------------------------------
# Misc definitions: same as program definitions above.
#
#DEFINE whatis_grep_flags -i
#DEFINE apropos_grep_flags -iEw
#DEFINE apropos_regex_grep_flags -iE
#---------------------------------------------------------
# Section names. Manual sections will be searched in the order listed here;
# the default is 1, n, l, 8, 3, 2, 5, 4, 9, 6, 7. Multiple SECTION
# directives may be given for clarity, and will be concatenated together in
# the expected way.
# If a particular extension is not in this list (say, 1mh), it will be
# displayed with the rest of the section it belongs to. The effect of this
# is that you only need to explicitly list extensions if you want to force a
# particular order. Sections with extensions should usually be adjacent to
# their main section (e.g. "1 1mh 8 ...").
SECTION 1 n l 8 3 2 3posix 3pm 3perl 5 4 9 6 7
作者: ynzheng 发布时间: 2006-03-16
http://dlnow.com/blog/?p=51
作者: ynzheng 发布时间: 2006-03-17
作者: gnix_oag 发布时间: 2006-03-17
按照说明,一次到位~
由于今天重新装了一次,一开始连make都没有装~~:(
作者: SunApricot 发布时间: 2006-03-29
作者: gnix_oag 发布时间: 2006-03-29
wj712@wjtxg:~/Desktop$ cd man-pages-zh_CN-1.5
wj712@wjtxg:~/Desktop/man-pages-zh_CN-1.5$ make
mkdir UTF-8
cp -r src/man* UTF-8/
wj712@wjtxg:~/Desktop/man-pages-zh_CN-1.5$ sudo cp -r UTF-8/* /usr/share/man/zh_CN/
Password:
cp: ‘/usr/share/man/zh_CN/’: specified destination directory does not exist
请尝试执行‘cp --help’来获取更多信息。
wj712@wjtxg:~/Desktop/man-pages-zh_CN-1.5$
作者: rosn 发布时间: 2006-04-01
rosn@fanzhe:~/Desktop$ cd man-pages-zh_CN-1.5
rosn@fanzhe:~/Desktop/man-pages-zh_CN-1.5$ make
bash: make: command not found
rosn@fanzhe:~/Desktop/man-pages-zh_CN-1.5$ sudo make
sudo: make: command not found
make不行我就跳过,进行下一步也不行:
rosn@fanzhe:~/Desktop/man-pages-zh_CN-1.5$ sudo cp -r UTF-8/* /usr/share/man/zh_CN/
cp: stat‘UTF-8/*’失败: 没有那个文件或目录
rosn@fanzhe:~/Desktop/man-pages-zh_CN-1.5$
怎么办才好呢
作者: rosn 发布时间: 2006-04-02
作者: gnix_oag 发布时间: 2006-04-02
rosn@fanzhe:~/Desktop/man-pages-zh_CN-1.5$ sudo cp -r UTF-8/* /usr/share/man/zh_CN/
cp: ‘/usr/share/man/zh_CN/’: specified destination directory does not exist
请尝试执行‘cp --help’来获取更多信息。
rosn@fanzhe:~/Desktop/man-pages-zh_CN-1.5$
不好意思我是新手,只好再请教了。
作者: rosn 发布时间: 2006-04-03
把里面的所有的 /usr/share/man 的行改成 /usr/share/man/zh_CN 后,加再前面。
.
请问具体是怎么弄让可以在没有中文MAN的时候使用英文man的呢?
楼主说的加在前面是什么意思,是在/usr/share/man/zh_CN 前面添加/usr/share/man 吗,像这样:
作者: jazzi 发布时间: 2006-04-03
http://dlnow.com/blog/?p=51
作者: gnix_oag 发布时间: 2006-04-03
http://dlnow.com/blog/?p=51
谢谢,但是你上面的方法好像比较麻烦,得用cman,man的路径就不能多加一个吗
作者: jazzi 发布时间: 2006-04-03
作者: kissfire 发布时间: 2006-04-04
谢谢分享!
作者: lqw0205 发布时间: 2006-04-04
rosn@fanzhe:~/Desktop/man-pages-zh_CN-1.5$ sudo cp -r UTF-8/* /usr/share/man/zh_CN/
cp: ‘/usr/share/man/zh_CN/’: specified destination directory does not exist
请尝试执行‘cp --help’来获取更多信息。
rosn@fanzhe:~/Desktop/man-pages-zh_CN-1.5$
不好意思我是新手,只好再请教了。
先执行这条命令再试试:
作者: lqw0205 发布时间: 2006-04-04
作者: rosn 发布时间: 2006-04-05
作者: woods_1901 发布时间: 2006-04-16
tar: v:无法 open: 没有那个文件或目录
tar: 错误不可恢复:现在退出
tar: Child returned status 2
tar: /media/hda5/temp/man-pages-zh_CN-1.5.tar.gz:归档中找不到
tar: 由于前面延迟的错误而退出
-----------------------------
请问这是怎么回事,如何解决?
作者: asn 发布时间: 2006-04-17
作者: eexpress 发布时间: 2006-04-17
作者: 狼神 发布时间: 2006-05-18
作者: delux2008 发布时间: 2006-05-18
作者: alinmn 发布时间: 2006-05-24