mkdir

mkdir(,创建目录)命令UnixDOSOS/2Microsoft Windows操作系统以及PHP脚本语言中用于创建一个目录。DOS、OS/2和Windows中,这条指令常被简写用作md

用法

一般用法如下:

mkdir name_of_directory

name_of_directory是将被创建的目录名。如上所示输入后,会在当前目录下创建新目录。On Unix and Windows (with Command extensions enabled,[1] the default [2]), multiple directories can be specified, and mkdir will try to create all of them.

选项

在类Unix操作系统中,mkdir提供参数。最常用的三个参数为:

  • -p: will also create all directories leading up to the given directory that do not exist already. If the given directory already exists, ignore the error.
  • -v:显示mkdir创建的每个目录。通常与-p配合使用。
  • -m:指定目录的octal permissions

-p is most often used when using mkdir to build up complex directory hierarchies, in case a necessary directory is missing or already there. -m is commonly used to lock down temporary directories used by shell scripts.

历史


参考资料

  1. . Microsoft. [25 October 2012]. (原始内容存档于2006-07-10).
  2. . Microsoft. [25 October 2012]. (原始内容存档于2018-01-13).

外部链接

This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.