查看: 7677|回复: 0

Win2003 下常用的几个新行命令

[复制链接]
发表于 2003-9-18 13:21:18 | 显示全部楼层 |阅读模式
Win2003 下常用的几个新行命令
$ t7 ]. f9 P% V/ D& ^2 ^) E* ^   H# n; Y# S- \2 ?3 I
    Windows2003的cmd.exe比以前的windiws系统的cmd添加了60多个新的行命令,功能强大,方便多多;使得在命令行下对系统的管理更为方便。下面就我个人认为常用的几个行命令作以简介,更详细的用法请参见系统的帮助。
, t9 z9 z( D* Q7 w  G; z8 j! O( Q8 P1。clip 将行命令的输出导入系统剪贴板  V! s- ~0 U. R
    省去了选择和拷贝命令输出这两步。  K1 \& z6 t# ]- O. N% ^$ L
如:    dir|clip
  N) W" U* Z# S4 ~# J2 H( E可以将dir的结果导入系统剪贴板,并在可在notepad等文本编辑器中用Ctrl+V粘贴结果。, ?  j. z, |. ?) D, N3 Y# k- t
    clip<test.txt9 m" f! O# _. Z1 S. b& _' \  Y
这样就不用打开test.txt文件,而是直接将test.txt的内容导入剪贴板。
) S3 n6 b! Y$ t3 V5 N! c2。bootcfg 查询、配置、修改本地和远程机上的boot.ini文件
# `+ {6 R! P+ ]    参数太多,不细讲。
5 ?  I" ]0 t: Z* n; [9 s& {1 e3。inuse 替换被锁住的操作系统的系统文件。重新启动才生效。. t0 @8 b1 `% l: x  H. f0 u
用法:    inuse 替换文件 被替换文件 [/y]  x' x6 Z& Z  n( d; N7 K
如:       batch.cmd
/ h) n( a1 ?9 D* e& `  v: ]       @echo off; l! q+ g! K, @
       inuse test.dll c:\windows\system32\test.dll /y4 p8 p. e) a* X# H8 ]5 e4 T
       inuse test2.dll c:\windows\system32\test2.dll /y
3 V+ e/ Z: V5 E+ ?. e# {3 J2 L       inuse test3.dll c:\windows\system32\test3.dll /y& @' o4 T" U- T- Y) o  R' i) \5 z) k
       shutdown /l /r /y$ {0 o( A4 m( u8 v
用远程文件替换本机文件:
3 Q8 W8 g- E  E2 I    inuse \\srvmain\windows\test.dll c:\windows\test.dll
2 _6 {- B/ [! _( t3 f. z  e4。systeminfo 显示机器的系统信息,如:操作系统及其配置,产品ID,硬件属性等。) f5 u! M+ V7 m4 t
用法:systeminfo [/s Computer ][/u Domain\UserName ][/p Password]]] [/fo {TABLE | LIST | CSV}] [/nh]
1 N: s; E# m- F9 n0 C下面是本机的systeminfo的结果:9 U( \- k* y5 f  i/ K4 W+ X
Host Name:                 xxx' c8 g% ~9 W0 E& r
OS Name:                   Microsoft(R) Windows(R) Server 2003, Standard Edition
! T3 M1 W7 i7 P' l! t" cOS Version:                5.2.3790 Build 3790
6 C  n6 X& F  N) W2 ~( cOS Manufacturer:           Microsoft Corporation  O8 J/ ~: m7 J
OS Configuration:          Member Server+ I' {2 a" ^: t. F5 [. C3 M" G
OS Build Type:             Uniprocessor Free
3 d. J1 t; H/ {# K' h8 zRegistered Owner:          xxx+ m8 ^! B. B6 Q1 F) X
Registered Organization:   yy5 z+ b/ T# ?7 b- d
Product ID:                69712-640-0592892-45260$ r8 W. ]$ y1 \% J1 d: R
Original Install Date:     2003-8-17, 0:02:07
( p# A% D% X+ h) U* K# d3 z0 |System Up Time:            1 Days, 11 Hours, 58 Minutes, 15 Seconds6 Y* a! n2 v9 i5 {. _0 a/ T& ~
System Manufacturer:       VIA Technologies, Inc.
! f3 U, p. J: k, ]7 ]# bSystem Model:              VT82C692BX
( o$ x* j0 l4 Y7 c2 c& z) ISystem Type:               X86-based PC) Z" A4 V$ o/ Y8 \, j2 N- X! e
Processor(s):              1 Processor(s) Installed.0 ?! K* U9 `! @: n: I; ?
                           [01]: x86 Family 6 Model 7 Stepping 3 GenuineIntel ~501 Mhz
' k; z% R% h4 O* DBIOS Version:              SOYO   - 42302e31
  z4 u6 P7 b; v1 }) x' J/ U" S, hWindows Directory:        c:\WINDOWS+ z" ]) Q6 Y6 G
System Directory:          c:\WINDOWS\system32' j. h4 p  X7 v  l- L# M* ^
Boot Device:               \Device\HarddiskVolume1
9 j* N# }1 |* B6 F1 Q+ S9 w5 h" OSystem Locale:             zh-cn;Chinese (China)+ S0 }. S( O4 o
Input Locale:              en-us;English (United States)
5 Z( l+ V5 c9 l" N  v; M) [Time Zone:                 (GMT+08:00) Beijing, Chongqing, Hong Kong, Urumqi/ u5 V0 u1 I9 v
Total Physical Memory:     639 MB
* k, p2 ~6 r/ C6 Z3 M7 h6 yAvailable Physical Memory: 327 MB
6 o. a7 B- X1 g0 NPage File: Max Size:       2,205 MB
3 \, j" L3 A- t. u4 i% J4 y8 JPage File: Available:      1,608 MB" i9 M& g# w2 C
Page File: In Use:         597 MB
: l2 i; n% `0 F3 n$ @9 |Page File Location(s):     c:\pagefile.sys
" s* |8 ~' t- jDomain:                    dd.cc.bb.cn! p  X; {' \& _) i5 Z
Logon Server:              \\SERVER-dd, ?9 G1 Y* K' L7 ]
Hotfix(s):                 3 Hotfix(s) Installed.
# r; ?% S& w! B& @9 i! m4 n  l                           [01]: File 1+ @1 J8 i& R2 r  F0 D' v
                           [02]: Q147222& d8 S+ d; L. M( }4 ^
                           [03]: KB823980 - Update7 E' u" |4 k) q' o& m7 W
Network Card(s):           1 NIC(s) Installed.
( }* _+ p4 T/ g! T5。taskkill 结束任务和进程。许多在图形界面的任务管理器不能结束的任务和进程,它都可以完成。常和tasklist配合使用。- Y/ h+ v4 W, D/ {5 h5 B. E% S+ B
用法:taskkill [/s Computer] [/u Domain\UserName ][/p Password]] {/fi FilterName [{/pid ProcessID | /im     ImageName}] | /pid ProcessID | /im ImageName} [/f] [/t]  l7 q+ O% O3 l; J0 t: p' Q/ q
    最近的冲击波病毒等就靠它杀死的,很有用!!!以前taskkill叫kill,不过当时系统不自带,是在Resource Kit里。" o7 z$ H0 J) ]# L) ?7 m! K$ M
6。tasklist 显示正在运行的进程) ]9 D" x6 |8 |, c1 u9 |; R, a
用法:tasklist[.exe] [/s Computer] [/u Domain\User ][/p Password]] [{/m Module | /svc | /v}] [/fo {TABLE | LIST | CSV}] [/nh] [/fi FilterName ][/fi FilterName2 ][ ... ]]] + k6 h0 y) a" ~: G8 x" x  @2 {
7。where 显示所查找的文件或者目录的位置(在where德当前位置和系统path环境变量所声明的路径里,可以用同配符*,?)。这里的一个大虾在这win2003以前也写了个同名同功能的批处理文件,我用过,很棒。可以起诉微软了!哈哈!!% |( d4 z1 `6 Z
用法:where [/r Dir] [/q] [/f] [/t] Pattern ...
( d) s5 V: z3 t1 v6 c  [) k如:    where "program files"
- T* J5 E+ C) m! l5 E. c    where /r c:\ test 0 t# T; Y/ s* h+ o2 G- K1 i9 x
    where /r \\computer1\c /e notepad.*3 K- ]5 a5 M, {4 A" j/ c+ v
8。whoami 查询域名、计算机名、用户名、组名、登陆identifier以及当前用户的权限。9 V3 Z; Z2 [( l. J4 q- J( {
如:whoami /all / u* a! u# c4 Z  y( {

; g! X& U% ?( \* N) B
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

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

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

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

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