Change the shell working directory.
- Repository:
opencomputers - System:
openos - Type:
command
OpenComputers/src\main\resources\assets\opencomputers\loot\openos\bin\cd.luaOpenComputers/src\main\resources\assets\opencomputers\loot\openos\usr\man\cdOpenSecurity/src\main\resources\assets\opensecurity\lua\SecureOS\usr\man\cd
cd [DIRECTORY]cd -Update the current shell working directory used to resolve relative paths. Without an argument the command switches to HOME; with - it switches to OLDPWD and prints the resulting directory.
DIRECTORY: Optional target directory. If omitted, use the path stored inHOME.
--help: Print a short usage message.
cd /binChange the current working directory to /bin.
cd ../Move from the current directory to its parent directory.
cd -Jump back to the previous working directory stored in OLDPWD.
- A missing
HOMEorOLDPWDenvironment variable causes the command to fail before path resolution starts. - On success the command updates
OLDPWDto the directory that was active before the change.