查看: 7553|回复: 0

Win2003 下常用的几个新行命令

[复制链接]
发表于 2003-9-18 13:21:18 | 显示全部楼层 |阅读模式
Win2003 下常用的几个新行命令
5 F9 ~5 }2 t; ~. ~; Z7 W: d  W, ] : b) o8 Z; S. d) d- M
    Windows2003的cmd.exe比以前的windiws系统的cmd添加了60多个新的行命令,功能强大,方便多多;使得在命令行下对系统的管理更为方便。下面就我个人认为常用的几个行命令作以简介,更详细的用法请参见系统的帮助。
% e9 M& U; [1 ~: c8 ?/ [6 T1。clip 将行命令的输出导入系统剪贴板
7 V) N- r+ w' w% @$ U: t1 }9 s    省去了选择和拷贝命令输出这两步。  [' |3 a# l1 Z
如:    dir|clip6 D4 K5 y) @/ B% @/ O
可以将dir的结果导入系统剪贴板,并在可在notepad等文本编辑器中用Ctrl+V粘贴结果。7 U/ K, P6 [3 M0 g8 G3 t9 A8 f
    clip<test.txt
7 N6 R$ _$ n& c$ h8 v这样就不用打开test.txt文件,而是直接将test.txt的内容导入剪贴板。" q6 e. J; ?  J
2。bootcfg 查询、配置、修改本地和远程机上的boot.ini文件; V0 U6 }. M1 ^
    参数太多,不细讲。
/ g7 L  M4 r$ y' `3。inuse 替换被锁住的操作系统的系统文件。重新启动才生效。& b( _* N0 V: i& e- p
用法:    inuse 替换文件 被替换文件 [/y]5 j$ P! t8 i* }5 ]5 L7 Z8 E
如:       batch.cmd
4 }) @) }9 M: |" X       @echo off" `9 J# N  S! _
       inuse test.dll c:\windows\system32\test.dll /y$ r/ \/ i9 y: k: N+ K
       inuse test2.dll c:\windows\system32\test2.dll /y* S$ u" s# V  f8 i2 _
       inuse test3.dll c:\windows\system32\test3.dll /y$ M5 l- y* e0 g. |" ~/ L
       shutdown /l /r /y
9 o. Q6 f6 @) t  S' R用远程文件替换本机文件:
; \, U/ [& Z  s: K) Y6 ?* N$ K# v    inuse \\srvmain\windows\test.dll c:\windows\test.dll# S$ y; Y" V5 f5 h8 b" n
4。systeminfo 显示机器的系统信息,如:操作系统及其配置,产品ID,硬件属性等。2 o! f# y& S- u* m$ ^! ]. o/ m0 G6 u
用法:systeminfo [/s Computer ][/u Domain\UserName ][/p Password]]] [/fo {TABLE | LIST | CSV}] [/nh]" P+ J  d! j, K; w6 S- ]4 ~" x
下面是本机的systeminfo的结果:# x2 j6 V" F* W& O1 z% ~/ D- K* j
Host Name:                 xxx
: u8 Y7 H" U% n0 r! cOS Name:                   Microsoft(R) Windows(R) Server 2003, Standard Edition. l) ]% r2 [* w) V
OS Version:                5.2.3790 Build 3790
6 e* g1 b) u# G1 r. s- y; Z# lOS Manufacturer:           Microsoft Corporation
/ u/ |  F3 f, ^7 c0 d% COS Configuration:          Member Server) Q! V/ L  G/ [9 x. E
OS Build Type:             Uniprocessor Free) |4 o5 f$ l9 _
Registered Owner:          xxx0 |1 g6 H! ^# q7 L% V
Registered Organization:   yy
/ s$ S1 [% ^, Z6 i# e/ P0 CProduct ID:                69712-640-0592892-45260- O$ S* l3 c: C/ h) C! h1 A4 k
Original Install Date:     2003-8-17, 0:02:07
$ D/ V5 j, k" sSystem Up Time:            1 Days, 11 Hours, 58 Minutes, 15 Seconds
; G$ W3 ]# S' @" ?: rSystem Manufacturer:       VIA Technologies, Inc.
& m* J/ y! x" ^8 C8 j$ OSystem Model:              VT82C692BX* j+ o5 m" |! ?3 _" O
System Type:               X86-based PC
" ]3 j) {0 E7 [: {2 hProcessor(s):              1 Processor(s) Installed.1 H, S$ J, f/ m  ]% A( `
                           [01]: x86 Family 6 Model 7 Stepping 3 GenuineIntel ~501 Mhz
8 e) _/ R- q% P9 TBIOS Version:              SOYO   - 42302e317 B. o2 U0 i2 p4 L2 x6 {, k
Windows Directory:        c:\WINDOWS& g# ^, `8 p7 |; [( u4 ?. e
System Directory:          c:\WINDOWS\system32' O; J7 w. \" {3 @1 y
Boot Device:               \Device\HarddiskVolume1
! [3 V/ W% t0 {9 q: |" R. y% qSystem Locale:             zh-cn;Chinese (China)
$ w  \: [0 H# F7 J6 `  [2 }4 bInput Locale:              en-us;English (United States): y& R% s3 K5 S; H1 {7 [
Time Zone:                 (GMT+08:00) Beijing, Chongqing, Hong Kong, Urumqi
3 Y: j# v, D3 f1 b4 B/ b9 cTotal Physical Memory:     639 MB
  C( N5 m* o  yAvailable Physical Memory: 327 MB/ X4 y4 O1 Z6 k5 w  O' n; F
Page File: Max Size:       2,205 MB" F( ~: [5 j5 S4 Q% f
Page File: Available:      1,608 MB  Y/ C; h0 e6 U9 |3 \* s9 W3 F$ p; e
Page File: In Use:         597 MB7 B4 U, X# v3 L" d8 m5 a- s3 V0 y& P4 x
Page File Location(s):     c:\pagefile.sys
7 g$ [' B  `& n  K7 XDomain:                    dd.cc.bb.cn, z2 ~. J( C0 v" N
Logon Server:              \\SERVER-dd% X$ ~; D; k: m8 O% ~
Hotfix(s):                 3 Hotfix(s) Installed.
9 O% I; N  ], X( o4 |                           [01]: File 1* a" r; F( c# O7 C
                           [02]: Q147222" d) e3 J. _6 A0 M2 t
                           [03]: KB823980 - Update
1 p4 _2 R# f4 r) iNetwork Card(s):           1 NIC(s) Installed.
+ ~8 d& ~8 M! L2 z( P5。taskkill 结束任务和进程。许多在图形界面的任务管理器不能结束的任务和进程,它都可以完成。常和tasklist配合使用。: W2 w& R! c) ^
用法:taskkill [/s Computer] [/u Domain\UserName ][/p Password]] {/fi FilterName [{/pid ProcessID | /im     ImageName}] | /pid ProcessID | /im ImageName} [/f] [/t]
# A" q1 A8 K- M    最近的冲击波病毒等就靠它杀死的,很有用!!!以前taskkill叫kill,不过当时系统不自带,是在Resource Kit里。
$ l: {& C6 g+ G+ A7 y, `6。tasklist 显示正在运行的进程
  n; K0 R( I1 h' f用法:tasklist[.exe] [/s Computer] [/u Domain\User ][/p Password]] [{/m Module | /svc | /v}] [/fo {TABLE | LIST | CSV}] [/nh] [/fi FilterName ][/fi FilterName2 ][ ... ]]] $ X; h4 E# O4 c# |4 A: \5 T& [# V
7。where 显示所查找的文件或者目录的位置(在where德当前位置和系统path环境变量所声明的路径里,可以用同配符*,?)。这里的一个大虾在这win2003以前也写了个同名同功能的批处理文件,我用过,很棒。可以起诉微软了!哈哈!!% B# M4 z5 j, g6 K& }& c) a
用法:where [/r Dir] [/q] [/f] [/t] Pattern ...
6 N1 m5 R* I7 {& ]- I1 N( Y0 s如:    where "program files"7 C2 `$ a* U/ s( a5 ~. ]4 W8 [
    where /r c:\ test
/ |/ W5 G# G2 s: q0 F    where /r \\computer1\c /e notepad.*
2 J; W6 u! ?% f8。whoami 查询域名、计算机名、用户名、组名、登陆identifier以及当前用户的权限。% J1 H+ |* g8 S! `
如:whoami /all 5 y% W, O& Y7 U  f) B+ g5 I: g- d/ C

2 Z. @* t* O, c( d4 m4 x
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关闭

站长推荐上一条 /1 下一条

相关侵权、举报、投诉及建议等,请发 E-mail:yesdong@qq.com

Powered by Discuz! X5.0 Licensed © 2001-2026 Discuz! Team.44152102000001

在本版发帖QQ客服返回顶部