China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-08-12 16:31
中国DOS联盟论坛 » DOS学习入门 & 精彩文章 (教学室) » Common DOS Commands 2: View 3,273 Replies 15
Original Poster Posted 2003-06-03 00:00 ·  中国 湖南 长沙 电信
初级用户
倚 天
Credits 106
Posts 2
Joined 2003-06-03 00:00
23-year member
UID 3304
Gender Male
Status Offline


Common DOS Commands 2:
                                  ——cd  

  We've already used the cd command before, everyone surely remembers it, right? cd is the abbreviation of the English change directory, and it's also one of the most commonly used commands. Just as the name suggests, if you want to enter a directory, then obviously this is the command to use.

  Before talking about the cd command, let's first discuss what the prompt means. The current prompt is c:\>



  This c: means the current working drive is drive C, that is, the current drive is the hard disk. The \ right after c: tells us that the current working directory is the root directory. The function of this > is only to separate the working directory from the command we are going to type; it has no other meaning. In this way, we can tell from the prompt what the current working drive and working directory are. If you understand this point clearly, then learning the cd command becomes easy and effortless.

  Alright, now if we want to enter the dos directory, what should we do? Right, just type cd dos directly.



  Notice that the prompt has changed, becoming c:\dos>. This tells us that our current working directory is the dos subdirectory under the root directory of drive C. If you want to go back to the upper-level directory, just type cd .., and you'll see the prompt change back again. Isn't it very simple? To enter a subdirectory, just type cd + space + subdirectory name. If you want to return to the upper-level directory, type cd .. (two dots).     

  Now practice a bit: if you want to enter the windows subdirectory, what do you do? Of course, type cd windows. Under the windows directory, there is another subdirectory: system. Go into it as well by typing cd system. Alright, pause a moment. At this point, if I want to return to the root directory, what should I do? Use cd ..? Of course you can, but you'd have to use it twice. We have a better way: actually, you only need to type the three characters cd\ to return to the root directory in one step. Try it yourself.

  The purpose of the cd command is to let us go to any directory. We place files of different functions into different directories for convenience of management, but when we want to use a certain file, we have to go to the directory where that file is located. For example, to use wps, you have to go to the directory where wps is; to use windows, you have to go to the directory where windows is. In fact, once you've learned the cd command, you can reach any directory on the disk. But there is one point to remind you of: if you want to go to a directory on a drive other than the current one, you must first enter the drive letter and press Enter. After the current drive changes to the other disk, only then can you use the cd command to reach the directory you want to go to.
大家好啊!!
希望大家以后给我多多的指教啊!!!
Floor 2 Posted 2003-06-04 00:00 ·  中国 河北 石家庄 联通
初级用户
Credits 120
Posts 4
Joined 2003-06-04 00:00
23-year member
UID 3572
Gender Female
Status Offline
Thanks, please continue, hope to see more!
Floor 3 Posted 2003-06-04 00:00 ·  中国 广东 广州 联通
初级用户
★★
香蕉术士
Credits 317
Posts 52
Joined 2003-05-18 12:00
23-year member
UID 2231
Gender Male
Status Offline
Strongly support this. It gets rid of the stiff bookish tone and really raises interest in learning. Hope you can keep posting.
永远支持永远支持
Floor 4 Posted 2003-06-05 00:00 ·  中国 山东 淄博 联通
初级用户
Credits 123
Posts 5
Joined 2003-06-05 00:00
23-year member
UID 3672
Gender Male
Status Offline
Thanks
我是菜鸟,我知道。
菜鸟无罪~~~~~!
Floor 5 Posted 2003-06-05 00:00 ·  中国 辽宁 大连 联通
初级用户
Credits 113
Posts 2
Joined 2003-06-05 00:00
23-year member
UID 3677
Gender Male
Status Offline
This kind of article is very good. Support you.
Floor 6 Posted 2003-06-05 00:00 ·  中国 山西 太原 联通
初级用户
Credits 115
Posts 3
Joined 2003-06-05 00:00
23-year member
UID 3702
Gender Male
Status Offline
good!
Do you also have detailed materials about other commands?
Floor 7 Posted 2003-06-05 00:00 ·  中国 江苏 南京 电信
初级用户
Credits 106
Posts 1
Joined 2003-06-05 00:00
23-year member
UID 3800
Gender Male
Status Offline
It's already very detailed, so I'll say thanks here.
Floor 8 Posted 2003-06-05 00:00 ·  中国 黑龙江 哈尔滨 联通
高级用户
★★
Credits 830
Posts 233
Joined 2002-11-29 00:00
23-year member
UID 364
Gender Male
Status Offline
Come on, boss! There are still people who don't know this!? I'm dizzy! Everyone go find a book from 90~95 at the old book market! I remember even books from 98 still work!
┃ \\\\//// ┃通缉:杨小邪 特点:贼丑
┃ (-●●-) ┃年龄:刚成年 性别:男
┃ \ / ┃罪名:长的丑/总想见网友
┃ \︶/ ┃犯罪事实:吓死一片~
Floor 9 Posted 2003-06-05 00:00 ·  中国 湖北 武汉 蔡甸区 电信
元老会员
★★★★★
步行的人
Credits 9,654
Posts 3,351
Joined 2003-03-11 00:00
23-year member
UID 1113
Gender Male
From 湖北
Status Offline
Hehe~ it has to be compatible...
弄花香满衣,掬水月在手。
明月鹭鸟飞, 芦花白马走。
我自一过后,野渡现横舟。
青云碧空在,净瓶水不流。
http://dos.e-stone.cn/guestbook/index.asp
======中國DOS聯盟=====
我的新网页http://rsds.7i24.com欢迎光顾
Floor 10 Posted 2003-06-06 00:00 ·  中国 黑龙江 哈尔滨 联通
初级用户
Credits 115
Posts 3
Joined 2003-06-06 00:00
23-year member
UID 3914
Gender Male
Status Offline
Easy to understand. Thanks!!!
Floor 11 Posted 2003-06-06 00:00 ·  中国 湖北 武汉 电信
初级用户
斬人拔刀齋
Credits 134
Posts 7
Joined 2003-06-06 00:00
23-year member
UID 3965
Gender Male
Status Offline
To the one in post #8, just because you know it doesn't mean there aren't newcomers who don't
don't be too arrogant
Floor 12 Posted 2003-06-06 00:00 ·  中国 广东 深圳 电信
初级用户
Credits 110
Posts 2
Joined 2003-06-06 00:00
23-year member
UID 4032
Gender Male
Status Offline
Support you. Hope you post more in the future.
Floor 13 Posted 2003-06-06 00:00 ·  中国 黑龙江 哈尔滨 联通
高级用户
★★
Credits 830
Posts 233
Joined 2002-11-29 00:00
23-year member
UID 364
Gender Male
Status Offline
  Now practice a bit: if you want to enter the windows subdirectory, what do you do? Of course, type cd windows. Under the windows directory, there is another subdirectory: system. Go into it as well by typing cd system. Alright, pause a moment. At this point, if I want to return to the root directory, what should I do? Use cd ..? Of course you can, but you'd have to use it twice. We have a better way: actually, you only need to type the three characters cd\ to return to the root directory in one step. Try it yourself.

  
Wouldn't d: work?
Let me add a bit more! md is for creating a new folder! Format: md path\folder name!
dir lists directories! The commonly used parameters are /p /a /w, just these! What are they used for? This command is harmless! I suggest you test it and you'll know! copy copies! Format! copy path\filename of the file to be copied destination path\filename

I think there aren't really any other commonly used ones!
┃ \\\\//// ┃通缉:杨小邪 特点:贼丑
┃ (-●●-) ┃年龄:刚成年 性别:男
┃ \ / ┃罪名:长的丑/总想见网友
┃ \︶/ ┃犯罪事实:吓死一片~
Floor 14 Posted 2003-06-07 00:00 ·  中国 福建 福州 电信
初级用户
Credits 110
Posts 2
Joined 2003-06-07 00:00
23-year member
UID 4113
Gender Male
Status Offline
First time here, showing my support.
Floor 15 Posted 2003-06-07 00:00 ·  中国 山东 临沂 联通
初级用户
Credits 110
Posts 2
Joined 2003-06-07 00:00
23-year member
UID 4134
Gender Male
Status Offline
Forum Jump: