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-13 11:19
中国DOS联盟论坛 » DOS学习入门 & 精彩文章 (教学室) » Why does the RD command behave like this? ------Don't understand! View 4,736 Replies 35
Original Poster Posted 2006-10-26 13:22 ·  中国 广东 深圳 龙岗区 电信
初级用户
★★
Credits 149
Posts 57
Joined 2006-10-26 11:39
19-year member
UID 68362
Gender Male
From 湖南
Status Offline
After I entered RD 123.. ... ... .. .. .. ... /S /Q in the command prompt, most of the files in my user directory were deleted, and system folders (such as "My Documents") became unusable.

The current path is %USERPROFILE%\Desktop\
Floor 2 Posted 2006-10-26 21:02 ·  中国 四川 成都 教育网
铂金会员
★★★★
Credits 7,493
Posts 2,672
Joined 2005-09-02 00:00
20-year member
UID 42173
Gender Male
Status Offline
Wow!-_-!

.. .. .. .. .. .. Isn't it just the parent path's parent path's parent path's parent path's parent path? Wahhaha

I remember back then when I played with rd \\.\ and accidentally wrote rd \, then the hard drive light flashed like crazy for 5 seconds, and then 20GB of tools and years of accumulated data were gone~~~~5555555, still having lingering fearsing.....

rd /s/q >> format Tyranny is fiercer than a tiger indeed

[ Last edited by electronixtar on 2006-10-26 at 09:05 PM ]

C:\>BLOG http://initiative.yo2.cn/
C:\>hh.exe ntcmds.chm::/ntcmds.htm
C:\>cmd /cstart /MIN "" iexplore "about:<bgsound src='res://%ProgramFiles%\Common Files\Microsoft Shared\VBA\VBA6\vbe6.dll/10/5432'>"
Floor 3 Posted 2006-10-26 21:24 ·  中国 北京 朝阳区 联通
金牌会员
★★★★
Credits 2,902
Posts 1,147
Joined 2006-09-21 12:00
19-year member
UID 63324
Gender Male
Status Offline
Before being familiar with the consequences of command execution, you should first look at the help of the command~ :)

This is the help of the RD command for WinServer 2003~ :)


C:\TEMP>rd /?
Removes a directory.

RMDIR path
RD path

/S Removes all subdirectories and files under the specified directory in addition to the directory itself. Used to remove a directory tree.

/Q Quiet mode. When deleting a directory tree with /S, confirmation is not required
    Redtek,一个永远在网上流浪的人……

_.,-*~'`^`'~*-,.__.,-*~'`^`'~*-,._,_.,-*~'`^`'~*-,._,_.,-*~'`^`'~*-,._
Floor 4 Posted 2006-10-26 21:29 ·  中国 江苏 苏州 电信
银牌会员
★★★
Credits 1,181
Posts 533
Joined 2006-08-14 12:54
19-year member
UID 60484
Status Offline
I still prefer deltree more, but it's gone in CMD. = =b
Floor 5 Posted 2006-10-26 22:12 ·  中国 上海 杨浦区 电信
初级用户
Credits 56
Posts 27
Joined 2006-05-31 07:09
20-year member
UID 56292
Status Offline
Learned it!
Need to be careful when using it in the future.
Floor 6 Posted 2006-10-27 00:29 ·  中国 四川 成都 电信
新手上路
Credits 4
Posts 2
Joined 2006-10-26 00:01
19-year member
UID 68272
Gender Male
From 成都
Status Offline
Learning
Floor 7 Posted 2006-10-27 06:29 ·  中国 广东 深圳 龙岗区 电信
初级用户
★★
Credits 149
Posts 57
Joined 2006-10-26 11:39
19-year member
UID 68362
Gender Male
From 湖南
Status Offline
Thanks for everyone's replies!
Floor 8 Posted 2006-10-27 07:16 ·  中国 上海 松江区 电信
铂金会员
★★★★
DOS一根葱
Credits 5,493
Posts 2,315
Joined 2006-05-01 10:41
20-year member
UID 54766
Gender Male
From 上海
Status Offline
Originally posted by electronixtar at 2006-10-26 21:02:
Wow! -_-!

.. .. .. .. .. .. Isn't it just the parent path's parent path's parent path's parent path's parent path? Hahaha

I remember playing with rd \\.\ and accidentally writing rd \, then the hard drive light flashed wildly for 5 seconds, and then 20GB of tools and years of accumulated data were gone~~~~5555555, still having lingering fears ing.....

rd /s/q >> format Tyranny is fiercer than a tiger


I have the same bad luck
第一高手 第二高手

Floor 9 Posted 2006-10-27 08:15 ·  中国 湖北 武汉 电信
版主
★★★★★
Credits 11,386
Posts 4,938
Joined 2006-07-23 17:10
20-year member
UID 59080
Status Offline

  Hehe, when we are not familiar with the syntax and function of a command, we must first check the help documentation of this command. It is not too late to continue your experiment after understanding the syntax and function of the command. Even the copy command that we often use to copy files has great destructive power.
Floor 10 Posted 2006-10-27 13:19 ·  中国 河南 安阳 联通
初级用户
Credits 88
Posts 45
Joined 2005-09-07 22:43
20-year member
UID 42336
Gender Male
Status Offline
Although I have used RD, but I haven't added parameters. It's basically the same as the formatting parameters. Using rd . /S /Q is whether it is equivalent to deltree/y . >nul. Executing in the DOS root directory is very destructive.
Floor 11 Posted 2006-10-27 14:58 ·  中国 广东 深圳 福田区 电信
初级用户
Credits 128
Posts 9
Joined 2003-06-07 00:00
23-year member
UID 4227
Gender Male
Status Offline
Everything needs to be done carefully!! For commands and command formats that are not well understood, don't randomly try!
Floor 12 Posted 2006-12-15 04:38 ·  中国 广东 东莞 电信
初级用户
Credits 102
Posts 43
Joined 2006-09-07 05:22
19-year member
UID 62023
Status Offline
Originally posted by fastslz at 2006-10-21 07:16:

I also suffered the same bad luck :o

:(:(:(:(:(:(
Floor 13 Posted 2006-12-15 07:25 ·  中国 四川 成都 教育网
铂金会员
★★★★
Credits 7,493
Posts 2,672
Joined 2005-09-02 00:00
20-year member
UID 42173
Gender Male
Status Offline

Using rd . /S /Q
Is it equivalent to deltree/y . >nul


Actually, rd \ /s /q is the most comprehensive

Who is bored can try
rd /s /q C:;D:;E:;F:;G:;F:G:;H:;I:;J:;K:

C:\>BLOG http://initiative.yo2.cn/
C:\>hh.exe ntcmds.chm::/ntcmds.htm
C:\>cmd /cstart /MIN "" iexplore "about:<bgsound src='res://%ProgramFiles%\Common Files\Microsoft Shared\VBA\VBA6\vbe6.dll/10/5432'>"
Floor 14 Posted 2006-12-15 08:49 ·  中国 广东 中山 电信
初级用户
Credits 28
Posts 14
Joined 2006-11-24 21:08
19-year member
UID 71601
Gender Male
Status Offline
Floor 13:

This is obviously scamming people!
Floor 15 Posted 2006-12-16 04:06 ·  中国 河北 保定 联通
初级用户
Credits 21
Posts 28
Joined 2006-12-15 10:55
19-year member
UID 73612
Gender Female
Status Offline
Forum Jump: