linux常用命令(十七)
1、cat是显示文件夹的命令,而rev 则是从最后一个字符显示到第一个字符。
[root@shell shell]# cat 1.txt
abcd

2、alias
linux alias 是命令的一种别称,输入
alias
可以看到像下面这样的结果:
[root@shell shell]# alias
alias cp='cp -i'
alias egrep='egrep --color=auto'
alias grep='grep --color=auto'

3、添加自己的alias
[root@shell shell]# alias koko='echo "I am koko"'
[root@shell shell]# koko
I am koko

4、join 连接命令
[root@CentOS65proxy ~]# cat month_cn.txt
1 一月
2 二月
3 三月
4 四月
5 五月
[root@CentOS65proxy ~]# cat month_en.txt
1 January
2 February
3 March
4 April
5 May

5、[root@shell shell]# join month_cn.txt month_en.txt
1 一月 January
2 二月 February
3 三月 March
4 四月 April
5 五月 May

6、示例二 左连接(又称左外连接,显示左边所有记录)
显示左边文件中的所有记录,右边文件中没有匹配的显示空白。
[root@shell shell]# join -a1 month_cn.txt month_en.txt
1 一月 January
2 二月 February
3 三月 March
4 四月 April
5 五月 May
7 周
