¿Por qué Interix mkdir no respeta el argumento -p?

¿Por qué Interix mkdir no respeta el argumento -p?

Estoy usando Interix en Windows para compatibilidad con Unix y encuentro el -pargumento para mkdirno comportarme como esperaba:

> which mkdir
C:\SFU\bin\mkdir

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

La página de manual de SUA para mkdir indica en parte:

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.

¿Por qué recibo un error sobre el directorio existente aunque aprobé -p? Parece que -pno se reconoce como una bandera y en su lugar está creando un directorio llamado -p. ¿Cómo se pasa el -pargumento?

Respuesta1

mkdirSe estaban levantando las ventanas en lugar de la de Interix. Evito el problema dando la ruta completa a mkdirla ubicación de Interix. Esto era necesario a pesar de que which mkdirle di uno a Interix.

información relacionada