mkdir dir [dir1 .. dirN]
This command creates the set of directories in the order they are specified on the command line. If an error is encountered making one of the directories, the command will continue to attempt to create the remaining directories on the command line.
This command returns 0 on success and non-zero if an error is encountered.
If this command is invoked with no arguments, nothing occurs.
The user must have sufficient permissions to create the directory.
For the fileio
test provided with RTEMS, this means the user
must login as root
not rtems
.
The following is an example of how to use mkdir
:
SHLL [/] # ls drwxr-xr-x 1 root root 536 Jan 01 00:00 dev/ drwxr-xr-x 1 root root 1072 Jan 01 00:00 etc/ 2 files 1608 bytes occupied SHLL [/] # mkdir joel SHLL [/] # ls joel 0 files 0 bytes occupied SHLL [/] # cp etc/passwd joel SHLL [/] # ls joel -rw-r--r-- 1 root root 102 Jan 01 00:02 passwd 1 files 102 bytes occupied
This command is included in the default shell command set.
When building a custom command set, define
CONFIGURE_SHELL_COMMAND_MKDIR
to have this
command included.
This command can be excluded from the shell command set by
defining CONFIGURE_SHELL_NO_COMMAND_MKDIR
when all
shell commands have been configured.
The mkdir
is implemented by a C language function
which has the following prototype:
int rtems_shell_rtems_main_mkdir( int argc, char **argv );
The configuration structure for the mkdir
has the
following prototype:
extern rtems_shell_cmd_t rtems_shell_MKDIR_Command;
Copyright © 1988-2008 OAR Corporation