Chdir

The chdir or cd command (change directory) in the Unix and DOS operating systems, is used to change the current working directory. It is available for use at the command line as well as in a UNIX shell script or DOS batch command file. cd is frequently included built into certain shells such as the Bourne shell, tcsh, and bash. A folder or directory is a logical section of a partition used to hold files. A directory is allowed to contain a directory. The CD command can be used to move down into a directory, move back into the parent directory, move all the way back to the root (/ in UNIX, \ in DOS) or move to any given directory name. For example, in UNIX:
    me@Wiki:~$ ls    workreports games encyclopedia text.txt    me@Wiki:~$ cd games    me@Wiki:games$  
The user is now in the "games" directory. The same thing in DOS would look like this:
    C:\> dir    workreports               Wed Oct 9th   9:01    games                     Tue Oct 8th  14:32    encyclopedia              Mon Oct 1st  10:05    text        txt           1903 Thu Oct10th  12:43    C:\> cd games    C:\games\> 
Note that cd has different effects on different operating systems if given with no arguments. For example, if executed without arguments in DOS, the current working directory is printed. If executed without arguments in UNIX, then the user is returned to the home directory. The effect of executing the cd command within a script or batch file also varies. In DOS, the caller's current directory can be directly altered by the batch file's use of this command. In UNIX the caller's current directory is not altered by the script's invocation of the cd command.
chdir() is also a POSIX C function which changes the working directory.
CHDIR() is also a Visual Basic function which changes the working directory.

 

<< PreviousWord BrowserNext >>
ferdinand ii of the two sicilies
no heavy petting
lights out
space metal
q switching
helmand river
ain't misbehavin'
obsession (album)
napier sabre
spatha
flying (album)
unidentified flying object (album)
carbonyl
choline
covenant (album)
randolph scott
anthology (album)
peseta
unionist
two handed sword
even stevens
right of way
transect
list of minerals
list of poles
mauna loa
hondo, kumamoto
directory
folder
rm
cardolan
dir (dos command)
dir
plug and play
mandela, massachusetts
la ronde
root directory
dora and cora webber
oedipus at colonus
george carlin
bill & ted's excellent adventure
lemon v. kurtzman
prohibition (writ)
institute for contemporary studies