给 unix 命令创建快捷,可以省去很多可能很繁琐的操作。比如,进入你的工作目录,每天都要做这样的操作很多次。如果你的目录很深,那么肯定费力。你可以通过创建快捷简化这个工作。
alias maowork="cd /mao/work/folder/"
This means you just type maowork into the terminal, you will be directed to the specific folder you pointed out in the former line.
aliases are not saved permanently if you do not explicitly tell the system to do so. You need to put the alias command line (the former command line) into the ".bash_profile" in your home directory, and source that file.
没有评论:
发表评论