CD

Change current working directory

CD

Change syncd’s working directory. Every later relative path depends on it: rcload, the automatic <word>.soc lookup for unknown commands, log, save and others. Paths are inside the syncd container, and the command runs there as root. The change lasts until syncd restarts.

  • cd <dir>: change directory (paths up to 511 characters).

  • cd -sethome <dir>: also make <dir> the home directory (HOME). It must be an absolute path. -sethome is case-sensitive.

The built-in help mentions FTP (user%password@host:<path>) and /flash paths. Neither works on SONiC. Also, cd without a directory does not go home, as the help suggests: it prints sh_cd, #01: Failed ARG_GET and fails.

Hardware-validated

drivshell> cd /tmp

Built-in help

Parameters: [[-sethome] <directory>]
    Change current working directory. <directory> must be of the
    form "usr%password@host:<path>" or "/flash/<directory>" for
    FTP to remote system or local flash disk respectively.
    If the target directory does not exist, this command may still
    succeed, but attempts to access files may fail.
    The -sethome option sets the new directory to be the home directory.

Further reading

SDK-6.5.20 HSDK Getting Started Guide (GS-SDK6520-R), plus SDK-6.5.20/21/22 Release Notes (RN-SDK65xx-R), Dell SmartFabric OS10 Installation, Upgrade, and Downgrade Guide (Appendix C/D: Upgrade PCIe firmware from DIAG OS / OS10 hshell), BCM_SDK命令, bcm 使用技巧.