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

Interix 창문 대신 창문이 mkdir선택되었습니다. Interix mkdir위치에 대한 전체 경로를 제공하여 문제를 방지합니다. which mkdirInterix에 하나를 제공했지만 이는 필요했습니다 .

관련 정보