I would like to create a folder called hello
and a sub folder located inside hello
called world
. I've tried mkdir $HOME/hello/world
but it does not work saying that it cannot create directory since no such file or directory exists. If I try $HOME/hello
I am able to create a folder called hello
inside $HOME
. How do I go about doing this? I do not want to use -p
to create the needed parent folders if they are missing.
我不确定您为什么不想对mkdir
使用-p
标志,但是如果您坚持要这样做,可以这样做:
mkdir $HOME/hello $HOME/hello/world
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.