2013年1月9日 星期三
linux grep color setting
1. Solution
alias grep_gray="GREP_COLOR='1;30' grep --color=always"
alias grep_red="GREP_COLOR='1;31' grep --color=always"
alias grep_green="GREP_COLOR='1;32' grep --color=always"
alias grep_yellow="GREP_COLOR='1;33' grep --color=always"
alias grep_blue="GREP_COLOR='1;34' grep --color=always"
alias grep_magenta="GREP_COLOR='1;35' grep --color=always"
alias grep_cyan="GREP_COLOR='1;36' grep --color=always"
2. Example
echo hello there | grep_magenta ll | grep_yellow ere
hello there
Reference:
detail
linux color tutorial
2013年1月8日 星期二
Centos linux etc system config
1. Introduction
This is the nerve center of your system, it contains all system related configuration files in here or in its sub-directories. A "configuration file" is defined as a local file used to control the operation of a program; it must be static and cannot be an executable binary. For this reason, it's a good idea to backup this directory regularly. It will definitely save you a lot of re-configuration later if you re-install or lose your current installation. Normally, no binaries should be or are located here. [detail]
2. Category
[Network]Firewall: /etc/sysconfig/iptables , service iptable restart
DNS server: /etc/resolv.conf
[File System]
Files system: /etc/fstab, mount -a
Auto mount: /etc/auto.mnt, /etc/auto.master, service autofs restart
訂閱:
文章 (Atom)