找回密码
 注册

QQ登录

只需一步,快速开始

查看: 4209|回复: 0

Win2003 下常用的几个新行命令

[复制链接]
发表于 2003-9-18 13:21:18 | 显示全部楼层 |阅读模式
Win2003 下常用的几个新行命令
) w: }$ H2 `, S3 J2 g: N
: e  m% [! D; `) v$ _& M' U    Windows2003的cmd.exe比以前的windiws系统的cmd添加了60多个新的行命令,功能强大,方便多多;使得在命令行下对系统的管理更为方便。下面就我个人认为常用的几个行命令作以简介,更详细的用法请参见系统的帮助。; X: X$ D2 P/ t# Z( n
1。clip 将行命令的输出导入系统剪贴板" `7 w+ @6 N" Z! W" z2 ?
    省去了选择和拷贝命令输出这两步。
7 b/ T8 J$ j6 k4 c7 O# [; K如:    dir|clip1 f7 Q9 d) n- A4 Z# m
可以将dir的结果导入系统剪贴板,并在可在notepad等文本编辑器中用Ctrl+V粘贴结果。
& K: d3 ~9 T1 [8 l; P    clip<test.txt# @9 U5 e3 p  N
这样就不用打开test.txt文件,而是直接将test.txt的内容导入剪贴板。* Q1 T' [% X1 G* H/ c- O* w1 K( v
2。bootcfg 查询、配置、修改本地和远程机上的boot.ini文件/ \: o; ?1 K/ p
    参数太多,不细讲。
0 n( m8 M+ c- |; ]! A3。inuse 替换被锁住的操作系统的系统文件。重新启动才生效。2 t; ~, e0 C% L
用法:    inuse 替换文件 被替换文件 [/y]7 x. n. z  _: M$ H1 B" g3 |( B
如:       batch.cmd
$ R0 W- B( C2 `% p8 o& R" s       @echo off- K0 ~0 u- T7 w# b+ L0 {7 }& o' K; e
       inuse test.dll c:\windows\system32\test.dll /y" l( B* W0 x* h: E
       inuse test2.dll c:\windows\system32\test2.dll /y
2 p! Y2 D# V% S. ]7 G0 J: |       inuse test3.dll c:\windows\system32\test3.dll /y
. s1 b4 s4 t, v, \: H       shutdown /l /r /y6 `  l3 q6 C8 B! C. b
用远程文件替换本机文件:/ Y- b; t1 l$ }, n9 `
    inuse \\srvmain\windows\test.dll c:\windows\test.dll! \& E4 b6 i2 u1 ^# c  `5 j
4。systeminfo 显示机器的系统信息,如:操作系统及其配置,产品ID,硬件属性等。# M2 B) J  n  u
用法:systeminfo [/s Computer ][/u Domain\UserName ][/p Password]]] [/fo {TABLE | LIST | CSV}] [/nh]( P& ?* h. C! n7 h& w! \6 y
下面是本机的systeminfo的结果:' D' r' L* Z; G/ n* o
Host Name:                 xxx/ _* d2 r1 Q9 \0 m7 _2 l
OS Name:                   Microsoft(R) Windows(R) Server 2003, Standard Edition
+ G! g. V0 Z/ L+ R& t. cOS Version:                5.2.3790 Build 37902 W! Y9 N6 d. b3 @  ^; F$ S
OS Manufacturer:           Microsoft Corporation
: m6 p( l; B6 `, ?7 aOS Configuration:          Member Server
0 _( W7 L3 d9 Z' \( rOS Build Type:             Uniprocessor Free
& q( _! o% S* _Registered Owner:          xxx
! N5 ^8 m) M7 e; A) h! E) aRegistered Organization:   yy3 J$ E1 O+ n0 @( d  ^+ L9 m6 M
Product ID:                69712-640-0592892-45260& j' [* n& F) j5 N& R
Original Install Date:     2003-8-17, 0:02:07
- h" W+ \. n- s- i$ f/ m9 uSystem Up Time:            1 Days, 11 Hours, 58 Minutes, 15 Seconds* y0 C4 T( J0 X7 E$ c" h. y- i
System Manufacturer:       VIA Technologies, Inc.
# O9 y1 m4 Z; USystem Model:              VT82C692BX
- }- p; X# F3 Z; w' tSystem Type:               X86-based PC
  a$ O' C5 U5 v! k/ x& x: }6 X* P/ m$ IProcessor(s):              1 Processor(s) Installed.0 K. a4 H. u! c
                           [01]: x86 Family 6 Model 7 Stepping 3 GenuineIntel ~501 Mhz4 e$ H' }6 e/ C/ _
BIOS Version:              SOYO   - 42302e31; Q+ R0 f4 v. N) V- r
Windows Directory:        c:\WINDOWS- T  q* x- d, U
System Directory:          c:\WINDOWS\system324 a6 F  W; |. U3 h5 D; h) a0 M& ~
Boot Device:               \Device\HarddiskVolume14 ]9 O4 d) |) i' y
System Locale:             zh-cn;Chinese (China)
8 p, |8 ~2 A+ l2 t, x- x, VInput Locale:              en-us;English (United States)
+ J4 j# a2 \1 cTime Zone:                 (GMT+08:00) Beijing, Chongqing, Hong Kong, Urumqi
- \' Q& Z  [( PTotal Physical Memory:     639 MB
# g6 R; J( p. |2 _4 MAvailable Physical Memory: 327 MB, R4 c- t& k; n+ R* `
Page File: Max Size:       2,205 MB
* ?7 C! B. f- ]+ w3 SPage File: Available:      1,608 MB8 n/ ?8 k" k1 K4 b
Page File: In Use:         597 MB/ M# w* d8 Y: }
Page File Location(s):     c:\pagefile.sys
! z  r: v5 Q3 j* ?  }  Y0 g, qDomain:                    dd.cc.bb.cn& x# O1 }: S- e
Logon Server:              \\SERVER-dd
8 A& R; x  n2 ?, IHotfix(s):                 3 Hotfix(s) Installed.
& o2 u6 I8 Z3 ^6 w! N7 Z                           [01]: File 1
. z6 y0 u% g9 @2 e% j+ p                           [02]: Q147222
; R1 s5 s; Q) ]% a6 Q( Z                           [03]: KB823980 - Update& e* h' r7 p$ S( o" Q/ s8 m4 h/ ]
Network Card(s):           1 NIC(s) Installed.
6 h' t/ r) y. q, h" _: v5。taskkill 结束任务和进程。许多在图形界面的任务管理器不能结束的任务和进程,它都可以完成。常和tasklist配合使用。1 L8 q5 x/ G! L$ E% A1 i0 ~4 @
用法:taskkill [/s Computer] [/u Domain\UserName ][/p Password]] {/fi FilterName [{/pid ProcessID | /im     ImageName}] | /pid ProcessID | /im ImageName} [/f] [/t]
: s( i  G1 u1 {9 U) p. K    最近的冲击波病毒等就靠它杀死的,很有用!!!以前taskkill叫kill,不过当时系统不自带,是在Resource Kit里。
  _0 m1 \+ A! X6。tasklist 显示正在运行的进程
7 ^4 N$ {2 R+ j4 T  p; L3 C用法:tasklist[.exe] [/s Computer] [/u Domain\User ][/p Password]] [{/m Module | /svc | /v}] [/fo {TABLE | LIST | CSV}] [/nh] [/fi FilterName ][/fi FilterName2 ][ ... ]]]   |2 |5 U' ]0 Z0 t3 r5 _+ x
7。where 显示所查找的文件或者目录的位置(在where德当前位置和系统path环境变量所声明的路径里,可以用同配符*,?)。这里的一个大虾在这win2003以前也写了个同名同功能的批处理文件,我用过,很棒。可以起诉微软了!哈哈!!
3 W2 |$ [7 x; Q% N- g  u( L用法:where [/r Dir] [/q] [/f] [/t] Pattern ...! D$ Q) {- w' F/ n
如:    where "program files") }+ v! E" A5 x5 {) ?% ?
    where /r c:\ test
, }8 Z- {+ E. }! ]    where /r \\computer1\c /e notepad.*) w" E1 S( ?! T( i3 @- d4 \
8。whoami 查询域名、计算机名、用户名、组名、登陆identifier以及当前用户的权限。
! e% G6 F/ ]) o! N8 M9 t如:whoami /all
" R3 |$ x! f7 [' s  ?1 c ( C& c- c" w5 Q' q6 i$ D: r5 A
*滑块验证:
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-7-20 11:50 , Processed in 0.028417 second(s), 4 queries , Redis On.

Powered by Discuz! X3.5 Licensed

Copyright © 2001-2020, Tencent Cloud.

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