harmony 鸿蒙cd

  • 2022-08-09
  • 浏览 (618)

cd

Command Function

This command is used to change the current working directory.

Syntax

cd [path]

Parameters

Table 1 Parameter description

Parameter Description Value Range
path Specifies the path of the new directory. You must have the execution (search) permission on the specified directory.

Usage Guidelines

  • If path is not specified, this command switches to the root directory.

  • If path is specified, this command switches to the specified directory.

  • The path value starting with a slash (/) represents the root directory.

  • The path value starting with a dot (.) represents the current directory.

  • The path value starting with two dots (..) represents the parent directory.

  • You can run cd - to alternate between two directories that are recently accessed.

Example

Run cd ...

Output

Parent directory information:

OHOS:/nfs$ cd ../
OHOS:/$ ls
bin  etc  nfs   sdcard   system  tmp  vendor
dev  lib  proc  storage  test    usr

你可能感兴趣的鸿蒙文章

harmony 鸿蒙Kernel

harmony 鸿蒙Kernel Coding Specification

harmony 鸿蒙Standard Libraries

harmony 鸿蒙Interrupt Management

harmony 鸿蒙Event

harmony 鸿蒙Mutex

harmony 鸿蒙Queue

harmony 鸿蒙Semaphore

harmony 鸿蒙Doubly Linked List

harmony 鸿蒙Memory Management

0  赞