让你的Linux更友好、更易用,是本文提供的技巧所要实现的目的,有的技巧可能非常简单,但是却很实用。
下面开始。
——————————————————————————————————
命令与工具增强:
【ls】时间信息更完整
[root@mha1 ~]# alias ls=’ls -ltr –time-style=”+|%Y-%m-%d|%H:%M:%S|”‘
[root@mha1 ~]#
【grep】高量检索项
[root@mha1 ~]# alias grep=’grep –color’
[root@mha1 ~]#
【history】时间戳与执行用户信息更完整
[root@mha3 mysql-cluster]# echo ‘export HISTTIMEFORMAT=”|%Y-%m-%d|%H:%M:%S| whoami
–> “‘ >> ~/.bash_profile
[root@mha3 mysql-cluster]# tail -n 2 ~/.bash_profile
export PATH
export HISTTIMEFORMAT=”|%Y-%m-%d|%H:%M:%S| whoami
–> ”
[root@mha3 mysql-cluster]# source ~/.bash_profile
[root@mha3 mysql-cluster]#
——————————————————————————————————
Last Edit:2016年12月16日16:41:56