如何定义一个命令的别名,如何在命令中引导另一个命令的执行结果
命令:alias
语法:alias zzz=‘ll’
例子:
创建别名
2016-09-25_16-46-29.png
[[email protected] zzz]# alias zzz=‘ll‘
[[email protected] zzz]#
[[email protected] zzz]# ls
aaa zlm
[[email protected] zzz]# zzz
total 0
drwxr-xr-x. 2 root root 6 Sep 26 00:03 aaa
-rw-r--r--. 1 root root 0 Jul 25 2017 zlm
删除别名
2016-09-25_16-49-20.png
[[email protected] zzz]# ls
aaa zlm
[[email protected] zzz]#
[[email protected] zzz]# unalias zzz
[[email protected] zzz]# zzz
bash: zzz: command not found...
时间: 2024-11-03 20:54:38