TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Shhh: The Undocumented DOS Commands (1999)

143 点作者 csapdani大约 5 年前

20 条评论

4cao大约 5 年前
Never realized INSTALLHIGH and LH were not documented. I recall using these, so I always assumed they were commonly known.<p>And :: for comments is just a creative trick based on how labels in batch files are parsed. It wasn&#x27;t originally supposed to be used this way, so no wonder the documentation never mentioned it.<p>The difficulty in writing batch scripts was always that the best (or sometimes only) way of doing many things was to use a command originally intended for something completely different, in a completely non-intuitive way, and examples for such usage were never part of any official documentation. For example:<p>To display an empty line (instead of &quot;ECHO is on&quot;):<p>ECHO.<p>To create a file:<p>COPY CON FILE.TXT<p>Even now, the way to load the output of a command into a variable is to use FOR:<p>FOR &#x2F;F %T IN (&#x27;TIME &#x2F;T&#x27;) DO SET TIME=%T<p>And the best way to empty a directory of all its contents is to use ROBOCOPY &#x2F;MIR.
评论 #23304784 未加载
评论 #23304625 未加载
kirubakaran大约 5 年前
Back in the day there were several computer books in the r&#x2F;The Undocumented .*&#x2F; pattern. That was super cool and I loved them, as if you were being revealed secrets that no one else knows. In retrospect they were mostly about unstable apis best avoided.
评论 #23303158 未加载
phoe-krk大约 5 年前
<a href="https:&#x2F;&#x2F;the-eye.eu&#x2F;" rel="nofollow">https:&#x2F;&#x2F;the-eye.eu&#x2F;</a>, as a whole, is a very unique community, with a lot of goodies stashed in its vaults.
yjftsjthsd-h大约 5 年前
So how were these found? Today I guess I&#x27;d try running strings on the executable or maybe straight-up opening them in a debugger or disassembler (I <i>assume</i> command-line argument parsing is a very obvious, easy-ish to read block of code right at the start of the program), but I&#x27;m not sure how much of that was available (or at widely accessible, at least) back when DOS was a big deal (this list talks about DOS 2.x, which is 1983).
评论 #23302777 未加载
评论 #23304374 未加载
评论 #23302818 未加载
评论 #23305994 未加载
评论 #23304296 未加载
评论 #23305234 未加载
评论 #23302698 未加载
评论 #23303456 未加载
Exmoor大约 5 年前
&gt;Last updated on Friday, January 1, 1999.<p>This is a walk down memory lane, but not in a good way. I&#x27;m very, very glad to no longer have to remember anything about config.sys.
评论 #23303495 未加载
snvzz大约 5 年前
Tangentially related: Freedos is close to 1.3 release, with a 1.3rc3 being prepared (partially out already).
orbitingpluto大约 5 年前
I remember feeling angry when I learned about the undocumented MBR switch for FDISK. There I was, beginning to learn to spell words with 6 or more letters, thinking I had to use a hex editor to clean up the MBR.<p>All that effort with no guidance whatsoever that could have been minimized with one extra line of documentation.
评论 #23304853 未加载
sorokod大约 5 年前
:: is not quite a command, see here:<p><a href="https:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;16632524&#x2F;what-does-double-colon-mean-in-dos-batch-files" rel="nofollow">https:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;16632524&#x2F;what-does-doubl...</a>
paulryanrogers大约 5 年前
Since very niche stuff there. Though it does bring back memories of using Alt+255 typed into directory names to hide our porn. (Thanks Joe!)
pjmlp大约 5 年前
Small anecdote, fdisk &#x2F;mbr once saved my database class project at the university, thanks to it I was able to rescue a PC that everyone though it was dead and thus was able to secure a terminal for our set of teams.<p>Alternatively, we would have had to wait endlessly for a free one, while we had a fixed deadline regardless of the students assigned to the class, and no the software wasn&#x27;t available elsewhere beyond our computer lab.
pan69大约 5 年前
I have been revisiting the DOS eco-system lately and I have run into a problem. I can&#x27;t remember how to ECHO a variable set in AUTOEXEC.BAT. E.g, to ECHO the BLASTER variable, I&#x27;ve tried ECHO BLASTER, ECHO $BLASTER, ECHO $BLASTER$, ECHO %BLASTER, etc.. But nothing. Somehow a Google search didn&#x27;t turn up anything. I&#x27;m starting to wonder if it was it even possible to do this and that my memory is incorrect?<p>Cool list by the way. Bookmarked!
评论 #23304736 未加载
评论 #23308064 未加载
评论 #23304748 未加载
jhoechtl大约 5 年前
When you created an in-memory drive (what the heck was the name for them in DOS?), for example to store temporary files on, the label FDISKFAKE was automatically given. If you tried to format the drive, format complained that an in-memory drive can&#x27;t be format. If you changed the label, format happily formated the drive.
评论 #23303507 未加载
qwerty456127大约 5 年前
&gt; FDISK &#x2F;MBR Re-writes the hard disk drive&#x27;s Master Boot Record.<p>I didn&#x27;t know it&#x27;s undocumented, and many people I knew used it (as well as FORMAT &#x2F;U) countless number of times.
siberianbear大约 5 年前
I remember learning about &quot;FDISK &#x2F;mbr&quot; from a DEC support tech support line. I rescued several hard disks with that command that other people had deemed &quot;broken&quot;.
评论 #23304812 未加载
mycall大约 5 年前
After DOS 3.31, many undocumented commands and BIOS IRQs were removed. This broke some software but it is interesting to see these undocumented commands beyond DOS 4 still existing.
gesman大约 5 年前
After being frustrated with limitations of xcopy i wrote my own program on C++ (bxcopy) which became my business for a few years paying my mortgage :)<p>These were some creative times!
Sniffnoy大约 5 年前
Note: There was an MS-DOS 8.0; it did not come with Windows 98, but rather with Windows Me.<p>I guess we&#x27;ll probably never see this updated to include that, though!
teddyh大约 5 年前
I remember using<p>A:\&gt; DIR.EXE<p>instead of having to type<p>A:\&gt; DIR *.EXE<p>IIRC, it worked for any extension, not just .EXE.
spiritplumber大约 5 年前
Middle school me had some fun with &#x2F;autotest.
unixhero大约 5 年前
Dos4 still had commands to control a tape deck
评论 #23304885 未加载
评论 #23303651 未加载