RTEMS Logo

RTEMS 4.9.5 On-Line Library


File and Directory Commands rmdir - remove empty directories

PREV UP NEXT Bookshelf RTEMS Shell User's Guide

3.2.7: rmdir - remove empty directories

SYNOPSYS:

rmdir  [dir1 .. dirN]

DESCRIPTION:

This command removes the specified set of directories. If no directories are provided on the command line, no actions are taken.

EXIT STATUS:

This command returns 0 on success and non-zero if an error is encountered.

NOTES:

This command is a implemented using the rmdir(2) system call and all reasons that call may fail apply to this command.

EXAMPLES:

The following is an example of how to use rmdir:

SHLL [/] # mkdir joeldir
SHLL [/] # rmdir joeldir
SHLL [/] # ls joeldir
joeldir: No such file or directory.

CONFIGURATION:

This command is included in the default shell command set. When building a custom command set, define CONFIGURE_SHELL_COMMAND_RMDIR to have this command included.

This command can be excluded from the shell command set by defining CONFIGURE_SHELL_NO_COMMAND_RMDIR when all shell commands have been configured.

PROGRAMMING INFORMATION:

The rmdir is implemented by a C language function which has the following prototype:

int rtems_shell_rtems_main_rmdir(
  int    argc,
  char **argv
);

The configuration structure for the rmdir has the following prototype:

extern rtems_shell_cmd_t rtems_shell_RMDIR_Command;


PREV UP NEXT Bookshelf RTEMS Shell User's Guide

Copyright © 1988-2008 OAR Corporation