-
-p:打印已经设置的命令别名。
-
命令别名设置:定义命令别名,格式为“命名别名=‘实际命令’”。
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
[root@moban ~]# alias network=
'cat/etc/sysconfig/network-scripts/ifcfg-eth0'
[root@moban ~]# network
DEVICE=eth0
TYPE=Ethernet
ONBOOT=yes
BOOTPROTO=none
DNS1=
202.96
.
128.86
HWADDR=
00
:0c:
29
:5b:fb:
00
DNS2=
202.96
.
128.166
IPV6INIT=no
USERCTL=no
IPADDR=
192.168
.
1.124
NETMASK=
255.255
.
255.0
GATEWAY=
192.168
.
1.1
|
1
2
|
[root@moban ~]# type network
network
is
aliased to `cat/etc/sysconfig/network-scripts/ifcfg-eth0'
|
1
2
3
4
5
6
7
8
9
|
[root@moban ~]# alias -p
alias cp=
'cp -i'
alias l.=
'ls -d .* --color=auto'
alias ll=
'ls -l --color=auto'
alias ls=
'ls --color=auto'
alias mv=
'mv -i'
alias network=
'cat/etc/sysconfig/network-scripts/ifcfg-eth0'
alias rm=
'rm -i'
alias which=
'alias | /usr/bin/which--tty-only --read-alias --show-dot --show-tilde'
|