SecureCRT grep關鍵字設置彩色高亮

版本ios

#查看版本#:bash

在終端中執行下列指令:
cat /etc/issue
能夠查看當前正在運行的 Ubuntu 的版本號。session

#查看文件信息,包含32-bit就是32位,包含64-bit就是64位#:字體

能夠輸入:uname -a編碼

#已安裝的軟件#:spa

1.查看安裝的全部軟件ci

dpkg -l      it

例如:dpkg -l | grep ftpio

2.查看軟件安裝的路徑字符編碼

dpkg -L | grep ftp

也能夠用 whereis ftp

3.查看軟件版本

aptitude show

例如:aptitude  show ftp

#grep關鍵字設置彩色高亮#

 

一、修改.bashrc

 

給grep起別名,用alias設置。個人這個系統其實已經寫有,可是是註釋掉的,

 

如今把他打開,看到84行:

 

84     alias grep='grep --color=auto'
       85     #alias fgrep='fgrep --color=auto'
       86     #alias egrep='egrep --color=auto'

 

這樣,在grep執行後的標準輸出就會將匹配的文件標識爲彩色。

 

[root@mode etc]# grep allowed_host /usr/local/nagios/etc/nrpe.cfg
         allowed_hosts= 172.30.71.20

 

若是你配置完以後沒有效果:請修改下secureCRT設置:

 

Location:

 

Options->Global options->General->Default session->Edit Default Settings->Terminal->

 

Appearance->Font

 

選項-全局選項-常規-默認會話-編輯默認設置-仿真(終端設置爲Linux並使用顏色方案)-外觀(字體Lucida Console 10pt,字符編碼UTF-8)

 

設置完之後關閉當前會話,從新打開便可。

 

----------------

 

設置色彩

 

選項-會話-終端-仿真-ANSI顏色(打勾便可)

相關文章
相關標籤/搜索