Ofey Chan, aka 'ofey404'
Pretending a subtitle is out there...
如果你不慎删除了 bashrc,请不要马上关闭现有的 shell。许多有价值的信息可以从其中恢复。
当然也可能是遇到了如下的情况:
<
打成了 <<
当然如果在版本控制系统下面操作,以上的错误都可以恢复。
env
# SHELL=/bin/bash
# SESSION_MANAGER=local/unix:@/tmp/.ICE-unix/2668,unix/unix:/tmp/.ICE-unix/2668
# ...
declare -F
# declare -f j
# declare -f jc
# declare -f unproxy
# ...
执行打印出的命令,就可以打印出函数的定义。
alias
# ...
# alias tr='todo remove'
# alias typora='/opt/typora/Typora'
# alias vim='nvim'
# alias which='(alias; declare -f) | /usr/bin/which --tty-only --read-alias --read-functions --show-tilde --show-dot'
# alias xzegrep='xzegrep --color=auto'
# alias xzfgrep='xzfgrep --color=auto'
# alias xzgrep='xzgrep --color=auto'
# ...
cat /etc/skel/.bashrc
source ...
语句,和用于判断的逻辑。
* Style sheet refers to Dr. Brian Robert Callahan