问题
How to create a folder witha a folder name containing spaces in linux?
For Example, folder name should be "Stack OverFlow".
回答1:
you can also do mkdir Stack\ OverFlow the \ does the same thing as " " but it is easier. so you can do stuff like mkdir Stack\ OverFlow\ is\ Great. you can manipulate that folder using the \ as well. so things like cd Stack\ OverFlow and rm -rf Stack\ OverFlow.
回答2:
Just use quotes around the name:
mkdir "this is my dir"
Then you can check it by also using quotes:
$ ls -ld "this is my dir"
drwxr-xr-x 2 me me 4096 Aug 17 11:59 this is my dir
来源:https://stackoverflow.com/questions/38993454/how-to-create-a-folder-with-a-folder-name-containing-spaces-in-linux