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 fruitsNow you are into the fruits folder.
现在您进入了fruits文件夹。
You can use the .. special path to indicate the parent folder:
您可以使用..特殊路径来指示父文件夹:
cd .. #back to the home folderThe # 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 ../carsThere 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 /etcThis 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