#User specific aliases and functions 밑에 저장하고자 하는 alias 를 등록한다.
alias ns='netstat -tpln'
이제 alias 를 지정 했으니 사용해보자.
[root@localhost ~]# ns
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 1124/sendmail: acce
tcp 0 0 0.0.0.0:443 0.0.0.0:* LISTEN 19991/nginx: master
tcp 0 0 0.0.0.0:5601 0.0.0.0:* LISTEN 21168/node
tcp 0 0 0.0.0.0:38371 0.0.0.0:* LISTEN 1076/sshd
bashrc 리로드 후 alias 목록 확인
. ~/.bashrc
alias
alias aaaa='hello word'
alias cp='cp -i'
alias data-daemon-log='tail -f /var/log/data-daemon/data-daemon.log'
alias egrep='egrep --color=auto'
alias enocean-log='tail -f /var/log/enocean/enocean.log'
alias fgrep='fgrep --color=auto'
alias grep='grep --color=auto'
alias l.='ls -d .* --color=auto'
alias ll='ls -l --color=auto'
alias ls='ls --color=auto'
alias message-daemon-log='tail -f /var/log/message-daemon/message-daemon.log'
alias mqtt-daemon-log='tail -f /var/log/mqtt-daemon/mqtt-daemon.log'
alias mv='mv -i'
alias mysql-elog='tail -f /var/log/mysql/mysql-error.log'
alias mysql-slog='tail -f /var/log/mysql/mysql-slow.log'
alias nginx-alog='tail -f /var/log/nginx/access.log'
alias nginx-elog='tail -f /var/log/nginx/error.log'
alias ns='netstat -tpln'
alias rm='rm -i'
alias tomcat-ca-log='tail -f /usr/local/server/advertise-apache-tomcat-8.5.43/logs/catalina.out'
alias which='alias | /usr/bin/which --tty-only --read-alias --show-dot --show-tilde'
댓글 없음:
댓글 쓰기