vi ~/.bashrc
#mkdir + cd
function mkdircd () { mkdir -p "$@" && eval cd "\"\$#\""; }
#eg: mkdircd 1/2/3/4/5/6 将创建1/2/3/4/5/6目录并进入第一层目录:即1/
#mkdir + cd
function mkdircd () { mkdir -p "$@" && eval cd "\"\$@\""; }
#eg: mkdircd 1/2/3/4/5/6 将创建1/2/3/4/5/6目录并进入最后一层目录:即1/2/3/4/5/6
source ~/.bashrc修改生效