windows命令提示符_是否可以清除Windows命令提示符中的历史记录?

windows命令提示符_是否可以清除Windows命令提示符中的历史记录?

windows命令提示符

windows命令提示符_是否可以清除Windows命令提示符中的历史记录?

If you use the Windows command prompt often throughout your work day, you may want or need to periodically clear the command history. Is it possible to do so while the command prompt is still open? Today’s SuperUser Q&A post has the answer to a curious reader’s question.

如果您在整个工作日中经常使用Windows命令提示符,则可能需要或需要定期清除命令历史记录。 在命令提示符仍然打开时可以这样做吗? 今天的“超级用户问答”帖子回答了一个好奇的读者的问题。

Today’s Question & Answer session comes to us courtesy of SuperUser—a subdivision of Stack Exchange, a community-driven grouping of Q&A web sites.

今天的“问答”环节由SuperUser提供,它是Stack Exchange的一个分支,该社区是由社区驱动的Q&A网站分组。

问题 (The Question)

SuperUser reader Alexander B. wants to know if it is possible to clear the history in the Windows command prompt:

超级用户阅读器Alexander B.想知道是否可以在Windows命令提示符下清除历史记录:

When using the Windows command prompt, a person can press the up arrow key to view and retrieve old commands. Is it possible to erase the command history, and if so, how would a person do it?

使用Windows命令提示符时,用户可以按向上箭头键查看和检索旧命令。 是否可以删除命令历史记录,如果可以,一个人将如何执行呢?

Is it possible to clear the history in the Windows command prompt?

是否可以在Windows命令提示符下清除历史记录?

答案 (The Answer)

SuperUser contributor AFH has the answer for us:

超级用户贡献者AFH为我们提供了答案:

There is a simple keyboard shortcut for doing so while the command prompt is still open, Alt+F7. Alternatively, the command history is cleared every time you exit and restart the command prompt.

在命令提示符仍处于打开状态时,可以使用简单的键盘快捷键Alt + F7进行操作 。 或者,每次退出并重新启动命令提示符时,都会清除命令历史记录。

If you want to explore further, you will find that there are very few questions about the command prompt that are not answered on the SS64 reference website.

如果要进一步探索,您会发现关于命令提示符的问题很少,在SS64参考网站上没有得到解答。



Have something to add to the explanation? Sound off in the comments. Want to read more answers from other tech-savvy Stack Exchange users? Check out the full discussion thread here.

有什么补充说明吗? 在评论中听起来不错。 是否想从其他精通Stack Exchange的用户那里获得更多答案? 在此处查看完整的讨论线程

翻译自: https://www.howtogeek.com/297971/is-it-possible-to-clear-the-history-in-the-windows-command-prompt/

windows命令提示符