1/4/2023 0 Comments Mkdir p means![]() ![]() (For more information about file modes, see chmod). Grants read, write, and execute permissions to the directory for all users. Same as the command above, but using a numerical file mode. Any user may also change to ("execute") the directory, for example with the cd command. mkdir -m a=rwx mydirĬreate the mydir directory, and set its file mode ( -m) so that all users ( a) may read ( r), write ( w), and execute ( x) it.įor directories, this means that any user on the system may view ("read"), and create/modify/delete ("write") files in the directory. For more information about using ~ to represent your home directory, see tilde expansion in bash. mkdir ~/myfilesĬreate the directory myfiles in your home directory, specified here with a tilde (" ~"). Examples mkdir myfilesĬreate a new directory named myfiles in the current directory. Mkdir returns an exit status of zero if all operations were successful, or a non-zero exit status if operations failed. For detailed information about security contexts, consult your SELinux documentation. If you are using SELinux, this option sets the security context of each created directory to context. Print a message for each created directory. When this option is specified, no error is reported if a directory already exists. The syntax of mode is the same as with the chmod command.Ĭreate parent directories as necessary. You can use the -m option to set a file mode ( permissions, etc.) for the created directories. If the Documents folder does not already exist, specify the -p option to create it automatically, otherwise the command fails. For instance, if the current directory is /home/hope, and you want to create the directory /home/hope/Documents/writing, you can use the command mkdir Documents/writing. ![]() More than one directory may be specified.Ī specified directory can include path information. If the specified directory does not already exist, mkdir creates it. ![]() Syntax mkdir directory mkdir -version mkdir -help Options directory ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |