Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Cd (command)
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Implementations == Generally, a computer system that provides access to a [[hierarchical file system]], provides a change directory command to set the working directory. As this applies to most operating system shells, most support a change directory command, including [[Unix]] and [[Unix-like]] (i.e. [[Linux]]) [[Unix shell|shells]], and [[Microsoft]] shells including [[Command Prompt]] and [[PowerShell]]. Other operating systems with shells supporting the command include [[OS/2]],<ref>{{cite web|url=http://www.jatomes.com/Help/Os2Cmd.php#CD|title=JaTomes Help – OS/2 Commands|website=www.jatomes.com|access-date=2019-08-11|archive-date=2019-04-14|archive-url=https://web.archive.org/web/20190414130029/http://www.jatomes.com/Help/Os2Cmd.php#CD|url-status=dead}}</ref> [[TRIPOS]],<ref>{{cite web|url=https://www.pagetable.com/docs/amigados_tripos/tripos_manuals.pdf |title=Introduction to Tripos |access-date=2020-05-01}}</ref> [[AmigaOS]]<ref>{{cite book|url=http://archive.org/details/1988-rugheimer-spanik-amigados-quick-reference|title=AmigaDOS quick reference|first1=Hannes|last1=Rügheimer|first2=Christian|last2=Spanik|date=May 1, 1988|publisher=Grand Rapids, Mi : Abacus|isbn=9781557550491|via=Internet Archive}}</ref> (where the command is implied for an input [[Path (computing)|path]]), [[ReactOS]],<ref>{{cite web|url=https://github.com/reactos/reactos/blob/master/base/shell/cmd/internal.c|title=Reactos/reactos|website=GitHub|date=3 January 2022}}</ref> [[DOSBox]], and [[Unified Extensible Firmware Interface|UEFI]].<ref name="EFI-Shells-and-Scripting">{{cite web | url = http://software.intel.com/en-us/articles/efi-shells-and-scripting/ | title = EFI Shells and Scripting | publisher = [[Intel]] | access-date = 2013-09-25 }}</ref> * On [[MS-DOS]], the command is available in version 2 and later<ref name="RUNNINGMSDOS">{{Cite book|author-last=Wolverton|author-first=Van|title=Running MS-DOS Version 6.22 (20th Anniversary Edition), 6th Revised edition|date=2003|publisher=[[Microsoft Press]]|isbn=0-7356-1812-7}}</ref> * [[DR DOS 6.0]] includes the command as both {{code|cd}} and {{code|chdir}}<ref name="drdos6userguide">{{Cite web |url=https://www.4corn.co.uk/archive/docs/DR%20DOS%206.0%20User%20Guide-opt.pdf |title=DR DOS 6.0 User Guide Optimisation and Configuration Tips |access-date=2019-08-13 |archive-url=https://web.archive.org/web/20190930135943/http://www.4corn.co.uk/archive/docs/DR%20DOS%206.0%20User%20Guide-opt.pdf |archive-date=2019-09-30 |url-status=dead }}</ref> * On [[Hewlett-Packard|HP]] [[HP Multi-Programming Executive|MPE/iX]] the command is {{code|chdir}}<ref>{{Cite web|url=http://www.teamnaconsulting.com/compresources/pdfs/c01687363.pdf|title=MPE/iX Command Reference Manual|access-date=2018-10-21|archive-date=2018-10-21|archive-url=https://web.archive.org/web/20181021232213/http://www.teamnaconsulting.com/compresources/pdfs/c01687363.pdf|url-status=dead}}</ref> * On [[Stratus VOS|OpenVOS]], the command is {{code|change_current_dir}}<ref>{{cite web |url=http://stratadoc.stratus.com/vos/19.1.0/r098-19/wwhelp/wwhimpl/common/html/r098-19.pdf |title= OpenVOS Commands Reference Manual |website=stratadoc.stratus.com |access-date=2020-09-12}}</ref> Unlike many shell commands that are implemented as separate [[application software|applications]], change directory is often built-in to the shell because it affects the [[State (computer science)|state]] of the shell whereas other commands modify system state outside the shell. If the command was implemented as a separate application, then the [[child process]] would need to modify state in the [[parent process]], but this is often prevented for safety. The command is built-in for most Unix shells ([[Bourne shell|Bourne]], [[tcsh]], [[Bash (Unix shell)|Bash]], etc.), Windows [[Command Prompt]] and [[PowerShell]], and MS-DOS [[COMMAND.COM]]. In a shell, the change directory command is typically implemented via a [[system call]] which on Unix and Unix-like systems is typically [[POSIX]] {{code|chdir()}} and on Windows is in the [[Windows API]]. The command is also provided in many programs other than shells. In the [[File Transfer Protocol]], the control stream command is {{code|CWD}}, but the functionality is available as {{code|cd}} in most command-line [[client (computing)|clients]] and some also provide {{code|lcd}} for changing the <u>l</u>ocal working directory vs. the remote setting. The [[numerical analysis|numerical computing]] environments [[MATLAB]] and [[GNU Octave]] include a change directory command as <code>cd</code>.<ref>{{cite web|url=https://www.mathworks.com/help/matlab/ref/cd.html|title=Change current folder – MATLAB cd|website=www.mathworks.com}}</ref><ref>{{cite web|url=https://octave.sourceforge.io/octave/function/cd.html|title=Function Reference: cd|website=octave.sourceforge.io}}</ref>
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Cd (command)
(section)
Add topic