Interix mkdir が -p 引数を尊重しないのはなぜですか?

Interix mkdir が -p 引数を尊重しないのはなぜですか?

私は Unix との互換性のために Windows 上で Interix を使用していますが、期待どおりに動作しない-pという問題が見つかりました。mkdir

> which mkdir
C:\SFU\bin\mkdir

> mkdir -p c:\Program Files\
A subdirectory or file -p already exists.
Error occurred while processing: -p.

mkdir の SUA マニュアル ページには、次のように記載されています。

NAME
     mkdir - make directories

SYNOPSIS
     mkdir [-p] [-m mode] directory_name [...]

DESCRIPTION
     The mkdir utility creates the directories named as operands, in the order
     specified, using mode rwxrwxrwx (0777) as modified by the current
     umask(2).

     -p      Create intermediate directories as required.  If this option is
             not specified, the full path prefix of each operand must already
             exist.  Intermediate directories are created with permission bits
             of rwxrwxrwx (0777) as modified by the current umask, plus write
             and search permission for the owner.  Do not consider it an error
             if the argument directory already exists.

を渡したのに、既存のディレクトリに関するエラーが発生するのはなぜですか-p? は-pフラグとして認識されず、代わりに という名前のディレクトリを作成しているようです-p。引数をどのように渡しますか-p?

答え1

mkdirInterix の代わりにウィンドウが取得されていました。この問題は、Interix のmkdir場所への完全なパスを指定することで回避しました。Interix を指定した場合も、この操作が必要でしたwhich mkdir

関連情報