GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||
GeezerVison is showing en.wikipedia.org — cd (command) - Wikipedia
ImplementationsGenerally, 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) shells, and Microsoft shells including Command Prompt and PowerShell. Other operating systems with shells supporting the command include OS/2,[1] TRIPOS,[2] AmigaOS[3] (where the command is implied for an input path), ReactOS,[4] DOSBox, and UEFI.[5]
Unlike many shell commands that are implemented as separate applications, change directory is often built-in to the shell because it affects the 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, tcsh, 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 The command is also provided in many programs other than shells. In the File Transfer Protocol, the control stream command is UseUse of the command varies by context, but there are widespread similarities among variants. The examples below, mostly apply to Unix and Unix-like shells, PowerShell and Command Prompt. To separate the directory names of a path, a program imposes command-line syntax such as a delimiting text between names – which varies by program. In particular, Unix and Unix-like shells use a forward slash Commonly, a dot is short-hand notation for the working directory and two dots is short-hand for its parent. For example, given working directory CommonFeatures that are commonly found for any change directory command:
Unix shellsUnix-based shells and PowerShell generally share these features:
Legacy Microsoft shellsDOS maintains separate working directories for each lettered drive, and also has the concept of a current working drive. The Example~) with a file and three subdirectories.Starting with working directory set to the user's home ( user@wikipedia:~$ ls workreports games encyclopedia text.txt user@wikipedia:~$ cd games user@wikipedia:~/games$ A similar session in Command Prompt might look like: C:\> dir workreports <DIR> Wed Oct 9th 9:01 games <DIR> Tue Oct 8th 14:32 encyclopedia <DIR> Mon Oct 1st 10:05 text txt 1903 Thu Oct10th 12:43 C:\> cd games C:\games> See also
References
Further reading
External linksWikibooks has a book on the topic of: Guide to Windows Commands The Wikibook Guide to Unix has a page on the topic of: Commands
Hidden categories: | ||||||||||||
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. | ||||||||||||