Spec-Zone.ru › Nushell

cd for filesystem

Change the current working directory.

Signature

> cd {flags} (path)

Flags

  • --physical, -P: Use the physical directory structure; resolve symbolic links before processing instances of ..

Parameters

  • path: The path to change to.

Input/output types:

input output
nothing nothing

Examples

Change to your home directory.

> cd ~

Change to the previous working directory (same as "cd $env.OLDPWD").

> cd -

Changing directory with a custom command requires 'def --env'.

> def --env gohome [] { cd ~ }

Move two directories up in the tree (the parent directory's parent). Additional dots can be added for additional levels.

> cd ...

The cd command itself is often optional. Simply entering a path to a directory will cd to it.

> /home

Copyright © 2019–2026 The Nushell Project DevelopersLicensed under the MIT License.
https://www.nushell.sh/commands/docs/cd.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API