command line命令小技巧

搜索文件
dir /s /b <FileName>
  /B          Uses bare format (no heading information or summary).
  /S          Displays files in specified directory and all subdirectories.
不用再打开其它窗口而且速度快
 
 
在PATH中搜索文件
echo %~$PATH:1
将这个命令存成test.cmd,执行test.cmd ping.exe,结果为C:\WINDOWS\system32\ping.exe
在命令行编译环境中会用到.
Advertisements
This entry was posted in 计算机与 Internet. Bookmark the permalink.

One Response to command line命令小技巧

  1. Xiaoguang says:

    第二个命令可以用where命令来代替

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s