2017-06-06 20 views

答えて

3

mkdirコマンドは、-で始まるので、オプションとして "-AFolder /"を解釈しようとします。バッシュマンページから

mkdir -- -AFolder 

使用--仮引数は、オプションを提供していないことを明示的に指示する

Unless otherwise noted, each builtin command documented in this section as accepting options preceded by - accepts -- to signify the end of the options.

+0

ご協力ありがとうございました – dungphanxuan

2
mkdir -p -- "-AFolder" 

使用-- bashコマンドを伝えるために、そのそれ以降のものは、フラグではなく、引数の一部です。男BAGEから:--大会に加えて

-- A -- signals the end of options and disables further option processing. Any arguments after the -- are treated as filenames and argu- ments. An argument of - is equivalent to --.

+0

ありがとうございます、その解決策 – dungphanxuan

0

mkdirサポートしていることを、あなたはまた、./とディレクトリ名を付加することができます。

mkdir ./-AFolder 
関連する問題