创建和更改目录的一个命令 [英] One command to create and change directory

查看:29
本文介绍了创建和更改目录的一个命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只搜索一个命令—&&| —创建一个目录,然后立即将您的当前目录更改为新创建的目录.(这是某人在linux-usage"考试中遇到的一个问题,他创建了一个新命令来执行此操作,但这并没有给他分数.)如果重要的话,这是在 debian 服务器上.

I'm searching for just one command — nothing with && or | — that creates a directory and then immediately changes your current directory to the newly-created directory. (This is a question someone got for his exams of "linux-usage", he made a new command that did that, but that didn't give him the points.) This is on a debian server if that matters.

推荐答案

我相信您正在寻找这个:

I believe you are looking for this:

mkdir project1 && cd "$_"

这篇关于创建和更改目录的一个命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆