「shell」创建并且进入文件夹
【shell】创建并且进入文件夹
mkdir & cd into it as single command
mkdir [folder] && cd $_ The biggest advantage of this over the functions is that it is portable. 表示前一个命令的最后一个参数
curl https://www.vuejs.org/ | grep -Eo "(http|https)://[a-zA-Z0-9./?=_-].(doc|docx|xls|xlsx|ppt|pptx|pdf)" | sort | uniq > list.txt | wget list.txt
【shell技巧】创建并且进入文件夹, 一个小技巧,务必收藏,熟记于心。
2018-10-20-18-08-01
创建并且进入文件夹
mkdir [folder] && cd $_
- mkdir 创建命令
- [folder]文件夹名字
- && 并且(接着执行后面的命令)
- cd 进入文件夹
- $_ 上一个命令的最后参数
example
mkdir RDhub && cd $_
不用我们再次「 cd RDhub 」输入了,在一定程度上节约了效率,一个小技巧,务必收藏,熟记于心。
请先 后发表评论~