RTEMS Logo

RTEMS 4.9.5 On-Line Library


File and Directory Commands cd - alias for chdir

PREV UP NEXT Bookshelf RTEMS Shell User's Guide

3.2.16: cd - alias for chdir

SYNOPSYS:

cd directory

DESCRIPTION:

This command is an alias or alternate name for the chdir. See cd for more information.

EXIT STATUS:

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

NOTES:

NONE

EXAMPLES:

The following is an example of how to use cd:

SHLL [/] $ cd etc
SHLL [/etc] $ cd /
SHLL [/] $ cd /etc
SHLL [/etc] $ pwd
/etc
SHLL [/etc] $ cd /
SHLL [/] $ pwd
/
SHLL [/] $ cd etc
SHLL [/etc] $ cd ..
SHLL [/] $ pwd
/

CONFIGURATION:

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

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

PROGRAMMING INFORMATION:

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

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

The configuration structure for the cd has the following prototype:

extern rtems_shell_cmd_t rtems_shell_CD_Command;


PREV UP NEXT Bookshelf RTEMS Shell User's Guide

Copyright © 1988-2008 OAR Corporation