首页 文章

mkdir -p创建什么作为父目录?

提问于
浏览
-2

我从http://www.techonthenet.com/unix/basic/mkdir.php读到mkdir命令"creates a single directories or multiple directories."和-p "If the parent directories don't exist, this command creates them" . 我在cmd(窗口操作系统)中尝试了这个命令并看到了-p和没有-p的命令,该命令只是创建了一个带文件名的文件 . 你如何看待"If parent directories don't exist creates them."的效果我假设C:\ Users \ chris>是我运行命令时的父目录(因此父目录存在) . 有没有办法看到-p的效果?

1 回答

  • 1

    尝试帮助 .

    C:\Users\User>mkdir/?
    Creates a directory.
    
    MKDIR [drive:]path
    MD [drive:]path
    
    If Command Extensions are enabled MKDIR changes as follows:
    
    MKDIR creates any intermediate directories in the path, if needed.
    For example, assume \a does not exist then:
    
        mkdir \a\b\c\d
    
    is the same as:
    
        mkdir \a
        chdir \a
        mkdir b
        chdir b
        mkdir c
        chdir c
        mkdir d
    
    which is what you would have to type if extensions were disabled.
    

    Installing Unix

    Unix Services for Windows可以从MS网站下载,也可以通过控制面板 - 程序和功能 - Windows功能安装 . 这取决于Windows的版本和版本 .

相关问题