找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 4802|回复: 0

Win2003 下常用的几个新行命令

[复制链接]
发表于 2003-9-18 13:21:18 | 显示全部楼层 |阅读模式
Win2003 下常用的几个新行命令
6 E/ r7 I) I' y  w  K8 v! E 6 g8 H" l$ A( L1 O
    Windows2003的cmd.exe比以前的windiws系统的cmd添加了60多个新的行命令,功能强大,方便多多;使得在命令行下对系统的管理更为方便。下面就我个人认为常用的几个行命令作以简介,更详细的用法请参见系统的帮助。7 J! a! i9 R# T- d( Y
1。clip 将行命令的输出导入系统剪贴板9 Y/ V/ E! k7 n
    省去了选择和拷贝命令输出这两步。+ h# |9 R- f+ _" R1 S* _3 O& e) T+ o
如:    dir|clip
$ b7 }/ u, [1 z. m* s$ K可以将dir的结果导入系统剪贴板,并在可在notepad等文本编辑器中用Ctrl+V粘贴结果。. M1 F8 `/ I: g- _
    clip<test.txt
( [5 q  m( J! N0 b) @+ a8 P  U: x这样就不用打开test.txt文件,而是直接将test.txt的内容导入剪贴板。; G9 Y- s# a, F9 y6 R1 x
2。bootcfg 查询、配置、修改本地和远程机上的boot.ini文件
* G4 w+ x) M- `' W0 f    参数太多,不细讲。# X$ j, }  P1 \2 _/ c
3。inuse 替换被锁住的操作系统的系统文件。重新启动才生效。
8 e* w* B9 V  g1 G& f用法:    inuse 替换文件 被替换文件 [/y]
& C' [: t0 a9 w+ @如:       batch.cmd& e! x4 u# U% \. d) H0 a
       @echo off; V; ]) R, u0 }) d
       inuse test.dll c:\windows\system32\test.dll /y
$ y9 s7 j7 @+ H) t$ n: E# {       inuse test2.dll c:\windows\system32\test2.dll /y
. J8 U0 i. |( t2 Z0 S, P7 k: K       inuse test3.dll c:\windows\system32\test3.dll /y/ e: r  W7 V9 j, G% }6 y
       shutdown /l /r /y6 @  g( J( d. b
用远程文件替换本机文件:
/ v' l* c0 {% J6 v, G    inuse \\srvmain\windows\test.dll c:\windows\test.dll  T# ~# Z1 ^1 J& t+ O2 F( q6 T# F% i
4。systeminfo 显示机器的系统信息,如:操作系统及其配置,产品ID,硬件属性等。
1 q9 M- \) z* ]# R0 g用法:systeminfo [/s Computer ][/u Domain\UserName ][/p Password]]] [/fo {TABLE | LIST | CSV}] [/nh]# y7 r; L3 ~+ q3 x
下面是本机的systeminfo的结果:6 D/ _, e* h& b7 d+ O4 e
Host Name:                 xxx
  H7 t! d, W8 ^! [OS Name:                   Microsoft(R) Windows(R) Server 2003, Standard Edition
+ ~, u+ a9 y$ G4 c3 tOS Version:                5.2.3790 Build 3790
% h+ @$ l" D, ^; u+ O$ K1 dOS Manufacturer:           Microsoft Corporation
- c$ `3 F0 q- TOS Configuration:          Member Server8 q0 P; x9 a+ S% |, m! R) `6 c: T. N
OS Build Type:             Uniprocessor Free$ Z5 P# p- d+ f7 {. L
Registered Owner:          xxx: t; s) `: N0 z
Registered Organization:   yy
+ ?  R, H  L: \& d7 ^Product ID:                69712-640-0592892-45260% ]; s8 Y: T1 x$ h& p/ r. ~; r
Original Install Date:     2003-8-17, 0:02:073 M2 v. v8 O  c4 T
System Up Time:            1 Days, 11 Hours, 58 Minutes, 15 Seconds
: S0 ~9 P2 B  C! V+ h# J% cSystem Manufacturer:       VIA Technologies, Inc.
; b0 A" @4 v9 c. {5 fSystem Model:              VT82C692BX) Q0 e) Z  C+ ~
System Type:               X86-based PC
% V/ K9 S* J* @- k9 }/ R0 W/ jProcessor(s):              1 Processor(s) Installed./ v/ E% L* [. {! F8 ~5 ]( Z% O
                           [01]: x86 Family 6 Model 7 Stepping 3 GenuineIntel ~501 Mhz5 n! x# Q9 b8 h' _/ f$ |; |
BIOS Version:              SOYO   - 42302e31
4 s( h, a8 X" c3 h3 t1 W+ z, H' pWindows Directory:        c:\WINDOWS
& ]5 U! j# v3 f# W0 W" O) Y8 TSystem Directory:          c:\WINDOWS\system32! s9 h0 O3 Y2 N
Boot Device:               \Device\HarddiskVolume12 _" y3 W# O6 {
System Locale:             zh-cn;Chinese (China)/ |0 W. [) ]% I8 b! }6 A0 o( ]0 D; U
Input Locale:              en-us;English (United States)
/ J0 a, j! j; ^Time Zone:                 (GMT+08:00) Beijing, Chongqing, Hong Kong, Urumqi1 E, j; q8 Z, _1 R5 K! x
Total Physical Memory:     639 MB
% i) G. H9 L0 X3 q. eAvailable Physical Memory: 327 MB. P4 Y4 A1 b$ H; X
Page File: Max Size:       2,205 MB
. y, G5 t# I" x- j4 q5 m8 k* F( e; tPage File: Available:      1,608 MB) C0 A+ M7 h8 h8 S9 Y- w
Page File: In Use:         597 MB
- D# h$ d3 R$ vPage File Location(s):     c:\pagefile.sys( z' a. s, s, u1 ]$ N
Domain:                    dd.cc.bb.cn0 E9 m1 b/ y; p3 b) K" s! {* f
Logon Server:              \\SERVER-dd! F' N+ j$ H$ l8 f3 k& U9 ]+ w
Hotfix(s):                 3 Hotfix(s) Installed.
! s, b% y/ C9 `                           [01]: File 1* T% k0 S9 C) A% ?; s+ C2 K) k
                           [02]: Q1472228 E: G8 G8 P: @$ {( T
                           [03]: KB823980 - Update( f: D$ ~$ R- X+ y9 F" \
Network Card(s):           1 NIC(s) Installed.  \; ]2 ]+ Y* {" P; _' R. V
5。taskkill 结束任务和进程。许多在图形界面的任务管理器不能结束的任务和进程,它都可以完成。常和tasklist配合使用。
2 c: _" b/ G5 n% S/ K用法:taskkill [/s Computer] [/u Domain\UserName ][/p Password]] {/fi FilterName [{/pid ProcessID | /im     ImageName}] | /pid ProcessID | /im ImageName} [/f] [/t]
1 M& `/ n1 G5 {2 ^    最近的冲击波病毒等就靠它杀死的,很有用!!!以前taskkill叫kill,不过当时系统不自带,是在Resource Kit里。
/ R' v/ H* w1 W& R8 [6。tasklist 显示正在运行的进程
  H- m' Q* j5 V+ |: q9 v2 t% g用法:tasklist[.exe] [/s Computer] [/u Domain\User ][/p Password]] [{/m Module | /svc | /v}] [/fo {TABLE | LIST | CSV}] [/nh] [/fi FilterName ][/fi FilterName2 ][ ... ]]]
0 E+ B' ~- B/ W$ U# z3 r7。where 显示所查找的文件或者目录的位置(在where德当前位置和系统path环境变量所声明的路径里,可以用同配符*,?)。这里的一个大虾在这win2003以前也写了个同名同功能的批处理文件,我用过,很棒。可以起诉微软了!哈哈!!% e! F# t- T! X0 o
用法:where [/r Dir] [/q] [/f] [/t] Pattern ...# A% x2 I, X/ h2 E+ N5 i4 Q
如:    where "program files"
- B2 S3 ^) T/ U- n# q" e4 T    where /r c:\ test
) M' o* i8 |3 {3 g) e/ m% G6 M4 F5 h    where /r \\computer1\c /e notepad.*
5 \# Q% m! h* X" g- v1 T8。whoami 查询域名、计算机名、用户名、组名、登陆identifier以及当前用户的权限。$ |6 u! y1 s0 L- S1 P! z, J  @
如:whoami /all
, z$ j) @/ E1 [3 ^ - X4 }6 s8 k. O
*滑块验证:
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|小黑屋|宽带技术网 |网站地图 粤公网安备44152102000001号

GMT+8, 2025-10-22 07:26 , Processed in 0.016696 second(s), 4 queries , Redis On.

Powered by Discuz! X3.5 Licensed

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表