vs调试技巧和诀窍系列_充分利用Windows命令行的20个最佳技巧和窍门

vs调试技巧和诀窍系列_充分利用Windows命令行的20个最佳技巧和窍门

vs调试技巧和诀窍系列

vs调试技巧和诀窍系列_充分利用Windows命令行的20个最佳技巧和窍门

Do you use the command line in Windows to get things done? If you are more comfortable typing commands to accomplish tasks than using the mouse, we have compiled 20 of the best Windows command line tips and tricks to help you become a command line guru.

您是否使用Windows中的命令行来完成任务? 如果您比使用鼠标更舒适地键入命令来完成任务,我们将整理20种Windows最佳命令行提示和技巧,以帮助您成为命令行专家。



从Windows命令提示符复制到剪贴板 (Copy to the Clipboard from the Windows Command Prompt)

vs调试技巧和诀窍系列_充分利用Windows命令行的20个最佳技巧和窍门

There may be times you need to copy text from the Windows command prompt and email it to someone for help with a problem or save it to a file for later reference. The following article shows you two methods of copying text from the command prompt to the clipboard for pasting into other programs.

有时您可能需要从Windows命令提示符下复制文本,然后通过电子邮件将其发送给某人以寻求问题的帮助,或将其保存到文件中以供以后参考。 下面的文章向您展示了两种从命令提示符复制文本到剪贴板以粘贴到其他程序的方法。

Copy To the Clipboard From the Windows Command Prompt

从Windows命令提示符复制到剪贴板



通过命令行将输出文本从命令行复制到Windows剪贴板 (Copy Output Text from the Command Line to the Windows Clipboard the Easy Way)

vs调试技巧和诀窍系列_充分利用Windows命令行的20个最佳技巧和窍门

The previous tip showed you two methods for copying text from the command line to the clipboard. The following article shows you an easier method using the clip.exe utility which is built into Windows 7 and Vista. If you are using Windows XP, the article provides a link so you can download the utility and tells you where to put it.

上一个技巧向您展示了两种将文本从命令行复制到剪贴板的方法。 下面的文章为您展示了使用Windows 7和Vista内置的clip.exe实用工具的一种简便方法。 如果您使用的是Windows XP,本文将提供一个链接,以便您可以下载该实用程序并告诉您将其放置在何处。

How to Copy Output Text from the Command Line to the Windows Clipboard

如何将输出文本从命令行复制到Windows剪贴板



如何在Windows命令提示符下启用Ctrl + V进行粘贴 (How to Enable Ctrl+V for Pasting in the Windows Command Prompt)

vs调试技巧和诀窍系列_充分利用Windows命令行的20个最佳技巧和窍门

If you copy a command from another program in Windows and want to paste it in the command prompt window, it generally requires using the mouse. If you prefer using Ctrl + V to paste text into the command prompt window, the following article shows you how to set up an AutoHotkey script to enable using the Ctrl + V keyboard combination on the command line.

如果从Windows中的另一个程序复制命令并将其粘贴到命令提示符窗口中,则通常需要使用鼠标。 如果您更喜欢使用Ctrl + V将文本粘贴到命令提示符窗口中,则下面的文章向您展示如何设置AutoHotkey脚本以在命令行上使用Ctrl + V键盘组合来启用。

How to Enable Ctrl+V for Pasting in the Windows Command Prompt

如何在Windows命令提示符下启用Ctrl + V进行粘贴



如何将目录列表打印或保存到文件 (How to Print or Save a Directory Listing to a File)

vs调试技巧和诀窍系列_充分利用Windows命令行的20个最佳技巧和窍门

If you need to print a listing of a directory containing a lot of files, such as music or video files, it is very easy to do using the command line. The following article shows you how use the command line to save time when printing a directory listing.

如果您需要打印包含许多文件(例如音乐或视频文件)的目录列表,则使用命令行非常容易。 下一篇文章向您展示在打印目录列表时如何使用命令行节省时间。

How to Print or Save a Directory Listing to a File

如何将目录列表打印或保存到文件



在启动时隐藏命令行和批处理文件窗口 (Hide Flashing Command Line and Batch File Windows on Startup)

vs调试技巧和诀窍系列_充分利用Windows命令行的20个最佳技巧和窍门

If you run a lot of batch files or scripts that use the command line, you have probably encountered the flashing command prompt window. The following article shows you how to use a utility, called Hidden Start, or hstart, that hides the command line window when you run a batch file or script outside of the command prompt window.

如果您运行许多使用命令行的批处理文件或脚本,则可能遇到了闪烁的命令提示符窗口。 下面的文章向您展示如何使用名为“隐藏启动”或hstart的实用程序,当在命令提示符窗口之外运行批处理文件或脚本时,该实用程序将隐藏命令行窗口。

Hide Flashing Command Line and Batch File Windows On Startup

在启动时隐藏闪烁的命令行和批处理文件Windows



从桌面右键单击菜单中打开命令提示符 (Open a Command Prompt From the Desktop Right-Click Menu)

vs调试技巧和诀窍系列_充分利用Windows命令行的20个最佳技巧和窍门

Instead of manually opening the command prompt and typing a path to open a directory at the command prompt, there is an easier and quicker way to do this. The following article shows you how to open a command prompt window to a specific directory from within Windows Explorer.

除了手动打开命令提示符并在命令提示符处键入打开目录的路径外,还有一种更简便快捷的方法。 下面的文章显示了如何从Windows资源管理器中打开命令提示符窗口到特定目录。

Stupid Geek Tricks: Open a Command Prompt From the Desktop Right-Click Menu

愚蠢的怪胎技巧:从桌面右键单击菜单中打开命令提示符



从您当前的命令提示符/终端目录打开文件浏览器 (Open a File Browser From Your Current Command Prompt/Terminal Directory)

vs调试技巧和诀窍系列_充分利用Windows命令行的20个最佳技巧和窍门

The previous tip showed you how to easily open a command prompt window to a specific directory. However, you may discover that you are doing something that would be easier to do using the mouse. Well, there’s an easy way to go the other way. The following article shows you how to open a Windows Explorer window to a specific directory from within a command prompt window.

上一个技巧向您展示了如何轻松地打开命令提示符窗口到特定目录。 但是,您可能会发现自己正在做一些使用鼠标更容易做的事情。 好吧,有一种简单的方法可以替代。 下面的文章显示了如何从命令提示符窗口中打开Windows资源管理器窗口到特定目录。

Open a File Browser From Your Current Command Prompt/Terminal Directory

从您当前的命令提示符/终端目录打开文件浏览器



如何个性化Windows命令提示符 (How to Personalize the Windows Command Prompt)

vs调试技巧和诀窍系列_充分利用Windows命令行的20个最佳技巧和窍门

The Command Prompt window is boring white text on a black background, by default, unlike the rest of Windows which is splashed with color and a variety of wallpaper options. The following article shows you how to customize the command prompt window with your choice of color.

默认情况下,“命令提示符”窗口在黑色背景上显示无聊的白色文本,这与其他Windows上的其他颜色和各种墙纸选项不同。 下面的文章向您展示如何通过选择颜色来自定义命令提示符窗口。

How To Personalize the Windows Command Prompt

如何个性化Windows命令提示符



为Windows命令提示符启用更多字体 (Enable More Fonts for the Windows Command Prompt)

vs调试技巧和诀窍系列_充分利用Windows命令行的20个最佳技巧和窍门

While we’re on the topic of customizing the command prompt window, there is an easy way to enable more fonts for use in the window. The following article shows you how to enable alternative fonts you can use to customize the command prompt window, such as some fonts used in Office 2007 and some fixed width fonts.

当我们讨论定制命令提示符窗口时,有一种简单的方法可以启用更多字体以在窗口中使用。 下面的文章向您展示如何启用可用于自定义命令提示符窗口的替代字体,例如Office 2007中使用的某些字体和某些固定宽度的字体。

Stupid Geek Tricks: Enable More Fonts for the Windows Command Prompt

愚蠢的怪胎技巧:为Windows命令提示符启用更多字体



如何使Windows命令提示符更宽 (How to Make the Windows Command Prompt Wider)

vs调试技巧和诀窍系列_充分利用Windows命令行的20个最佳技巧和窍门

There are some commands used at the command prompt that produce very wide results. It’s frustrating when you have to scroll to the right to see the rest of the text in the window. You may think you can’t make the window wider to view all the text at once, but there is a way to do it, that’s the same in Windows 7, Vista, and even XP. The following article shows you how.

在命令提示符处使用了一些命令,它们会产生非常广泛的结果。 当您必须向右滚动以查看窗口中的其余文本时,这很令人沮丧。 您可能会认为无法扩大窗口范围以一次查看所有文本,但是有一种方法可以做到,这与Windows 7,Vista甚至XP相同。 下一篇文章向您展示如何。

How to Make the Windows Command Prompt Wider

如何使Windows命令提示符更宽



如何从命令行创建,修改和删除计划任务 (How to Create, Modify and Delete Scheduled Tasks from the Command Line)

Do you use the Scheduled Tasks tool in Windows? There’s a SchTasks command you can use on the command line that allows you to control all aspects of your scheduled tasks. You can use this command to automatically manipulate tasks in batch scripts and in custom programs to communicate with the Task Scheduler. The following article shows you some example of using the SchTasks command.

您是否在Windows中使用“计划任务”工具? 您可以在命令行上使用SchTasks命令,该命令可以控制计划任务的各个方面。 您可以使用此命令自动处理批处理脚本和自定义程序中的任务,以与任务计划程序通信。 下面的文章为您展示了使用SchTasks命令的一些示例。

vs调试技巧和诀窍系列_充分利用Windows命令行的20个最佳技巧和窍门

How to Create, Modify and Delete Scheduled Tasks from the Command Line

如何从命令行创建,修改和删除计划任务



从Windows命令行终止进程 (Kill Processes from the Windows Command Line)

vs调试技巧和诀窍系列_充分利用Windows命令行的20个最佳技巧和窍门

Generally, in Windows, you use the Task Manager to kill tasks. However, if you’ve used Linux before, you are probably familiar with the ability to kill and start tasks from the command line. Wish you could do the same thing in Windows? The following article shows you how to use the Command line Process Viewer/Killer/Suspender utility to view a list of processes, kill processes, and even to change the priority of a process.

通常,在Windows中,您使用任务管理器杀死任务。 但是,如果您以前使用过Linux,则可能熟悉从命令行终止和启动任务的功能。 希望您可以在Windows中做同样的事情吗? 下面的文章向您展示如何使用命令行Process Viewer / Killer / Suspender实用程序查看进程列表,终止进程,甚至更改进程的优先级。

Kill Processes from the Windows Command Line

从Windows命令行终止进程



如何一次杀死所有iexplore.exe进程? (How Do I Kill All the iexplore.exe Processes at Once?)

vs调试技巧和诀窍系列_充分利用Windows命令行的20个最佳技巧和窍门

While we’re on the topic of killing tasks, how do you quickly kill the dozen or so iexplore.exe tasks running? Selecting each one in Task Manager and clicking End Process for each can be time consuming. The following article shows you how to use a command, called taskkill, to kill all the iexplore.exe processes by name. We even show you how to create a shortcut that will kill all the processes just by clicking on it. This utility will also work for other programs that open many processes.

当我们以杀死任务为主题时,如何快速杀死正在运行的十几个iexplore.exe任务? 在任务管理器中选择每个选项,然后为每个选项单击“结束进程”可能很耗时。 下面的文章向您展示如何使用名为taskkill的命令按名称杀死所有iexplore.exe进程。 我们甚至向您展示了如何创建一个快捷方式,只需单击它即可杀死所有进程。 该实用程序还可用于打开许多进程的其他程序。

How Do I Kill All the iexplore.exe Processes at Once?

如何一次杀死所有iexplore.exe进程?



如何从Windows命令行自动执行FTP上传 (How to Automate FTP Uploads from the Windows Command Line)

vs调试技巧和诀窍系列_充分利用Windows命令行的20个最佳技巧和窍门

If you create and maintain websites locally on your computer and then upload the files to the remote FTP server, wouldn’t it be handy to be able to automate the task? The following article shows you how to create a batch file to automate the task of uploading files to a remote FTP server.

如果您在计算机上本地创建和维护网站,然后将文件上传到远程FTP服务器,那么能够自动执行任务是否方便? 下面的文章显示了如何创建批处理文件以自动执行将文件上传到远程FTP服务器的任务。

How to automate FTP uploads from the Windows Command Line

如何从Windows命令行自动执行FTP上传



从命令行访问Google服务 (Access Google Services from the Command Line)

This tip may not be that useful, but it’s fun if you’re a geek. If you use Google Docs or create posts for Blogger, there’s a Python command line application, called GoogleCL, that allows you to access various Google services from the command line in Windows, Linux, or Mac OS X. The following article shows you how to use the command in Windows 7, and you can use it the same way on Linux and Mac OS X systems.

这个技巧可能没什么用,但是如果您是极客,那么它很有趣。 如果您使用Google文档或为Blogger创建帖子,则有一个名为GoogleCL的Python命令行应用程序,它允许您从Windows,Linux或Mac OS X中的命令行访问各种Google服务。以下文章向您展示了如何在Windows 7中使用该命令,您可以在Linux和Mac OS X系统上以相同的方式使用它。

vs调试技巧和诀窍系列_充分利用Windows命令行的20个最佳技巧和窍门

Access Google Services From the Command Line

从命令行访问Google服务



从命令行替换纯文本文件中的文本 (Replace Text in Plain Text Files from the Command Line)

vs调试技巧和诀窍系列_充分利用Windows命令行的20个最佳技巧和窍门

There are a variety of practical uses for a command line utility that allows you to easily and quickly replace text in plain text files. However, this utility is not available on the Windows command line. The following article shows you a VBScript that uses the Visual Basic Replace function and lists some practical uses for the script. You can also download the script.

命令行实用程序有多种实际用途,可让您轻松快速地替换纯文本文件中的文本。 但是,该实用程序在Windows命令行上不可用。 下面的文章向您展示了使用Visual Basic替换功能的VBScript,并列出了该脚本的一些实际用途。 您也可以下载脚本。

Replace Text in Plain Text Files from the Command Line

从命令行替换纯文本文件中的文本



如何从命令提示符中找出PC的主机名 (How to Figure Out Your PC’s Host Name From the Command Prompt)

vs调试技巧和诀窍系列_充分利用Windows命令行的20个最佳技巧和窍门

If you’re setting up a home network or you if you manage or maintain a work network, there will be times when you need to find out the name of a computer. The following article shows you an easier way to find this out using the command line, rather than the Control Panel.

如果要设置家庭网络,或者要管理或维护工作网络,则有时需要找出计算机的名称。 下面的文章向您展示了一种使用命令行而不是“控制面板”来更轻松地找到答案的方法。

How To Figure Out Your PC’s Host Name From the Command Prompt

如何从命令提示符中找出PC的主机名



从命令行生成已安装驱动程序的列表 (Generate a List of Installed Drivers from the Command Line)

vs调试技巧和诀窍系列_充分利用Windows命令行的20个最佳技巧和窍门

There’s a variety of third-party tools available for generating a list of installed drivers on your computer. However, what do you do if you need to generate a list of drivers on a computer without any of these tools and on which you cannot install software? The following article shows you how to use a command line utility that comes with Windows 7, Vista, and XP to view a list of installed drivers and how to save that list to a text file.

有多种第三方工具可用于生成计算机上已安装的驱动程序列表。 但是,如果需要在没有任何这些工具的情况下在计算机上生成驱动程序列表并且无法在其上安装软件,该怎么办? 下面的文章向您展示如何使用Windows 7,Vista和XP随附的命令行实用程序来查看已安装驱动程序的列表以及如何将该列表保存到文本文件中。

Generate a List of Installed Drivers from the Command Line

从命令行生成已安装驱动程序的列表



从Windows命令行显示启动服务的列表 (Display a list of Started Services from the Windows Command Line)

vs调试技巧和诀窍系列_充分利用Windows命令行的20个最佳技巧和窍门

Generally, to view a list of services running on your computer, you must access the Services tool through the Administrative Tools in the Control Panel. However, Windows also contains the Net utility that allows you to view the Services panel from the command line. The following article shows you how to use this utility to display a list of services started on your computer from the command line.

通常,要查看计算机上运行的服务列表,必须通过“控制面板”中的“管理工具”访问“服务”工具。 但是,Windows还包含Net实用程序,该实用程序使您可以从命令行查看“服务”面板。 下面的文章向您展示如何使用此实用程序显示从命令行在计算机上启动的服务的列表。

Display a list of Started Services from the Command Line (Windows)

从命令行显示启动服务的列表(Windows)



如何在Windows 7或Vista中删除系统文件 (How to Delete a System File in Windows 7 or Vista)

vs调试技巧和诀窍系列_充分利用Windows命令行的20个最佳技巧和窍门

This last tip is something we strongly suggest you DO NOT do. Deleting system files is dangerous and can severely mess up your system. Windows does not allow you to delete system files, even as administrator. However, if you absolutely have to delete a system file, there is a way around this limitation. The following article shows you how to take ownership of the file to be deleted and assign rights to delete or modify the file.

最后一个提示是我们强烈建议您不要这样做。 删除系统文件很危险,可能会严重破坏系统。 Windows不允许以管理员身份删除系统文件。 但是,如果您绝对必须删除系统文件,则可以通过一种方法来解决此限制。 下一篇文章向您展示如何获取要删除的文件的所有权以及如何分配权限以删除或修改文件。

How to Delete a System File in Windows 7 or Vista

如何在Windows 7或Vista中删除系统文件



The command line is a very useful tool for quickly performing many tasks or even automating tasks using batch scripts. We hope these tips help you become more a more savvy Windows command line user.

命令行是非常有用的工具,可用于快速执行许多任务,甚至可以使用批处理脚本自动执行任务。 我们希望这些技巧可以帮助您成为更精通Windows命令行的用户。

翻译自: https://www.howtogeek.com/99141/20-of-the-best-tips-and-tricks-for-getting-the-most-out-of-the-windows-command-line/

vs调试技巧和诀窍系列