带彩色字体的man pages(debian centos)

简介:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
我的博客已迁移到xdoujiang.com请去那边和我交流
简介
most is a paging program that displays,one windowful at a  time ,the contents of a  file  on a terminal.
It pauses after each windowful and prints on the window status line the  screen  the  file  name, 
current line number, and the percentage of the  file  so far displayed.
 
一、debian
1、安装包
apt-get -y  install  most
 
2、在.bashrc最后1行添加
export  PAGER= "/usr/bin/most -s"
 
3、生效
source  .bashrc
 
二、centos
1、直接在.bashrc最后1行添加 man 函数
man  () 
{
env  \
LESS_TERMCAP_mb=$( printf  "\e[1;31m" ) \
LESS_TERMCAP_md=$( printf  "\e[1;31m" ) \
LESS_TERMCAP_me=$( printf  "\e[0m" ) \
LESS_TERMCAP_se=$( printf  "\e[0m" ) \
LESS_TERMCAP_so=$( printf  "\e[1;44;33m" ) \
LESS_TERMCAP_ue=$( printf  "\e[0m" ) \
LESS_TERMCAP_us=$( printf  "\e[1;32m" ) \
man  "$@"
}
 
2、yum方式安装most
yum -y  install  most
 
三、参考
http: //www .cyberciti.biz /faq/unix-linux-color-man-pages-configuration/
 
四、直接上图

wKiom1VnRK2Srk7uAAmAgoPpDvQ571.jpg










本文转自 xdoujiang 51CTO博客,原文链接:http://blog.51cto.com/7938217/1655616,如需转载请自行联系原作者
目录
相关文章
|
4月前
|
Ubuntu Linux
Centos 7、Debian、Ubuntu中tree指令的检查与下载
Centos 7、Debian、Ubuntu中tree指令的检查与下载
|
7月前
|
Ubuntu Linux
debian/rehhat/linux/centos/ubuntu 安装IDEA
debian/rehhat/linux/centos/ubuntu 安装IDEA
101 0
|
安全 网络协议 Ubuntu
[CentOS,LISTEN,运行级别,NFS,Debian]强化Linux安全的10个技能
  1.找出不必要的服务   很明显,服务器上跑的服务,并不是每个都有用的。强烈建议检查并关掉不需要的服务,从而减少风险(多跑一个服务,就可能多几个漏洞)。   查询运行在runlevel 3的服务列表:   [afei@afei ~]# /sbin/chkconfig --list |grep '3:on'
125 0
|
安全 Linux 虚拟化
|
C语言 Linux
CentOS 7 Debian 8 安装VMware-tools
如在安装过程中碰到未找到gcc 或者 kernel headers的可按以下方案解决,适用任意版本 CentOS 7 1.
1073 0