首页 > 编程知识 正文

命令行cd,命令行

时间:2023-05-05 23:05:50 阅读:224147 作者:1681

cd命令行 python

Once you have a folder, you can move into it using the cd command. cd means change directory. You invoke it specifying a folder to move into. You can specify a folder name, or an entire path.

拥有文件夹后,可以使用cd命令将其移入该文件夹。 cd装置Ç焊割d irectory。 您调用它指定要移动到的文件夹。 您可以指定文件夹名称或整个路径。

Example:

例:

mkdir fruitscd fruits

Now you are into the fruits folder.

现在您进入了fruits文件夹。

You can use the .. special path to indicate the parent folder:

您可以使用..特殊路径来指示父文件夹:

cd .. #back to the home folder

The # character indicates the start of the comment, which lasts for the entire line after it’s found.

#字符表示注释的开始,在找到之后将持续整行。

You can use it to form a path:

您可以使用它来形成路径:

mkdir fruitsmkdir carscd fruitscd ../cars

There is another special path indicator which is ., and indicates the current folder.

还有另一个特殊的路径指示器是. ,并指示当前文件夹。

You can also use absolute paths, which start from the root folder /:

您还可以使用从根文件夹/开始的绝对路径:

cd /etc

This command works on Linux, macOS, WSL, and anywhere you have a UNIX environment

此命令可在Linux,macOS,WSL以及您拥有UNIX环境的任何地方使用

翻译自: https://flaviocopes.com/unix-command-cd/

cd命令行 python

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。