cd
Syntax
cd[path]
Description
Displays or changes the current directory.
Options
Usage
If a file system mapping is specified, the current working directory is changed for that device. Otherwise, the current working directory is changed for the current device.
If
path
is not present, the current working directory (including file system mapping) is displayed to standard output.
The following table describes the conventions that are used to refer to the directory, its parent, and the root directory in the UEFI Shell environment.
Convention |
Description |
---|---|
. |
Current directory. |
.. |
Parent of the current directory. |
\ |
Root of the current file system. |
The current working directory is maintained in the environment variable
%cwd%
.
Examples
To change the current file system to the mapped
fs0
file system:
Shell> fs0:
To change the current directory to subdirectory
efi
:
fs0:\> cd efi
To change the current directory to the parent directory (fs0:\
):
fs0:\efi\> cd ..
To change the current directory to
fs0:\efi\tools
:
fs0:\> cd efi\tools
To change the current directory to the root of the current
fs
(fs0
):
fs0:\efi\tools\> cd \
fs0:\>
cd
does not work. For example:
fs0:\efi\tools\> cd fs1:\
First enter
fs1:
, and then
cd
to the directory you want.
To move between volumes and maintain the current path:
fs0:\> cd \efi\tools
fs0:\efi\tools\> fs1:
fs1:\> cd tmp
fs1:\tmp> cp fs0:*.* .
This sequence copies all of the files in
fs0:\efi\tools
into the
fs1:\tmp
directory.