[英]cd(Change Directory) command on linux
I am trying to code on Colab and if I take a look at the code its self similar with linux, therefore I am asking how the commands work on linux.我正在尝试在 Colab 上编写代码,如果我看一下与 linux 相似的代码,因此我想问这些命令如何在 linux 上工作。 I am still confused the why cd on linux works.
我仍然对 linux 上的 cd 有效的原因感到困惑。 If I have code like this
如果我有这样的代码
cd A/B
it means to create new directory right?这意味着创建新目录对吗?
after the first code then I write this在第一个代码之后然后我写这个
!wget https://abcd.com
does it mean I download file from https://abcd.com and store it at B path?这是否意味着我从https://abcd.com下载文件并将其存储在 B 路径?
cd
does not create anything, it just changes your shell's current working directory. cd
不会创建任何东西,它只是更改 shell 的当前工作目录。
The !
!
in your next command is a bit weird, too.在你的下一个命令中也有点奇怪。 It indicates a history expansion of the most recent command line in your shell history starting with
wget
, adding https://abcd.com
to that command line and then running it.它表示 shell 历史记录中最新命令行的历史扩展,以
wget
开头,将https://abcd.com
添加到该命令行,然后运行它。 That could be pretty much anything, depending on what your shell history contains.这几乎可以是任何东西,具体取决于您的 shell 历史记录包含的内容。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.