zoukankan      html  css  js  c++  java
  • windows下常用的操作命令及dos命令

    常用windows运行命令
    mstsc---远程桌面连接
    regedit.exe---打开注册表
    services.msc---打开服务管理器
    rsop.msc---组策略结果集
    taskmgr---任务管理器
    eventvwr---事件查看器
    gpedit.msc---本地组策略编辑器
    osk---打开屏幕键盘
    calc---启动计算器
    write---打开写字板
    notepad---打开记事本
    winver---查看windows版本
    msconfig.exe---系统配置实用程序
    devmgmt.msc---打开设备管理器
    mspaint---画图板
    lusrmgr.msc---本机用户和组
    fsmgmt.msc---共享文件管理器
    logoff---注销计算机
    dcomcnfg---打开系统组件服务
    secpol.msc---打开本地安全策略
    compmgmt.msc---计算机管理
    perfmon.msc---计算机性能监测程序
    cleanmgr---打开磁盘清理工具
    diskmgmt.msc---磁盘管理器
    hostname---查看主机名
    ipconfig---查看IP配置信息
    dvdplay---DVD播放器
    tsshutdn----60秒倒计时关机命令

    shutdown -s -t  600 ---10分钟后关闭计算机(-s表示关闭,-t时间,-r重启,-l注销)   shutdown -a  取消刚才的操作

    =========================
    net user---查看当前系统有哪些用户
    net user 用户名---查看用户属性
    net start---查看开启了哪些服务
    net time \目标IP---查看指定IP时间
    net share ---查看本地开启的共享
    netstat -an ---相关开启了哪些窗口及连接情况
    netstat -s ---查看正在使用的所有协议的使用情况

    ……
    ========================
    文件及目录操作命令
    dir ---查看当前目录,类似linux下的ls命令。
    md 目录名----创建目录
    cd ---进入目录
    C:UsersAdministratorDesktop>cd /d e: ---进入E盘,使用CD命令要加参数/D。 可者如下直接输入e:回车即可。
    C:UsersAdministratorDesktop>e:
    E:>c: ----要进入某一磁盘,直接输入盘符加冒号,回车即可。
    C:UsersAdministratorDesktop>cd /d d:/app
    d:app>push f:share ----使用pushd命令直接到f:share目录下。

    tree c: ----以tree方式显示驱动器或路径目录结构
    tree c: est /F ---显示每个文件夹中文件的名称
    type c: est.txt ---显示文件的内容
    ====================
    Microsoft Windows [版本 6.1.7600]
    版权所有 (c) 2009 Microsoft Corporation。保留所有权利。
    C:UsersAdministrator>cd /d E:
    E:>dir--------------------查看当前目录内容
    驱动器 E 中的卷没有标签。
    卷的序列号是 0006-5BAA
    E: 的目录

    2014/11/19 23:22 <DIR> DB2
    2014/11/19 23:03 <DIR> LDAP资料
    2014/11/19 23:26 <DIR> linux资料
    ……
    E:>md test-------------------------创建test目录

    E:>cd test---------------------进入test目录

    E: est>dir--------------------显示test目录下的内容
    驱动器 E 中的卷没有标签。
    卷的序列号是 0006-5BAA

    E: est 的目录

    2014/11/23 16:14 <DIR> .
    2014/11/23 16:14 <DIR> ..
    0 个文件 0 字节
    2 个目录 89,755,025,408 可用字节

    E: est>echo this is a test of dos cmd to > testCreateFile.txt -------------------使用echo命令利用管道把内容输出到文件。
    DOS下没有提供直接创建文件的命令,但可以使用管道操作来创建文件,比如: dir>a.txt 此命令将dir的执行结果写入并保存到文件a.txt中。

    E: est>echo test2 > test2.txt

    E: est>echo test3 > test3.txt

    E: est>dir
    驱动器 E 中的卷没有标签。
    卷的序列号是 0006-5BAA

    E: est 的目录

    2014/11/23 16:33 <DIR> .
    2014/11/23 16:33 <DIR> ..
    2014/11/23 16:33 8 test2.txt
    2014/11/23 16:33 8 test3.txt
    2014/11/23 16:23 31 testCreateFile.txt
    3 个文件 47 字节
    2 个目录 89,755,025,408 可用字节

    E: est>type test2.txt ---------------------使用type命令查看文件内容
    test2

    E: est>md testdir -------------------------创建目录testdir

    E: est>tree /f --------------------------以tree方式显示每个文件夹中文件的名称
    文件夹 PATH 列表
    卷序列号为 0006-5BAA
    E:.
    │ test2.txt
    │ test3.txt
    │ testCreateFile.txt

    └─testdir

    ----------------------------返回上一目录及进入指定目录
    E: est>

    E: est estdir>e:

    E: est estdir>cd ..

    E: est>cd ..

    E:>cd test/testdir

    E: est estdir>
    -------------------------------使用pushd命令或是/d参数进入指定目录
    E: est estdir>pushd f:

    F:>cd /d c:

    C:UsersAdministrator>cd /d e:/test

    e: est>

    e: est>rd testdir-----------------------使用rd删除空目录,不能删除非空目录,不能删除当前子目录。

    e: est>copy test2.txt e: est estdir2 --------------------使用copy命令复制文件
    已复制 1 个文件。

    e: est estdir2 的目录

    2014/11/23 16:46 <DIR> .
    2014/11/23 16:46 <DIR> ..
    2014/11/23 16:33 8 test2.txt
    2014/11/23 16:45 14 test3
    2014/11/23 16:46 5 test4.txt
    3 个文件 27 字节
    2 个目录 89,755,025,408 可用字节

    e: est estdir2>del test3 test2.txt ----------------------使用del命令删除文件

    e: est estdir2>dir
    驱动器 E 中的卷没有标签。
    卷的序列号是 0006-5BAA

    e: est estdir2 的目录

    2014/11/23 16:46 <DIR> .
    2014/11/23 16:46 <DIR> ..
    2014/11/23 16:46 5 test4.txt
    1 个文件 5 字节
    2 个目录 89,755,025,408 可用字节


    e: est estdir2>ren test4.txt testtest.txt -------------------使用ren命令重命令文件

    e: est estdir2>dir
    驱动器 E 中的卷没有标签。
    卷的序列号是 0006-5BAA

    e: est estdir2 的目录

    2014/11/23 16:48 <DIR> .
    2014/11/23 16:48 <DIR> ..
    2014/11/23 16:46 5 testtest.txt
    1 个文件 5 字节
    2 个目录 89,755,025,408 可用字节

    e: est estdir2>

    e: est>xcopy testdir3 e: est estdir2 --------------使用xcopy命令复制目录及其目录下所有文件
    testdir3 est111.txt
    复制了 1 个文件

    e: est>move test2.txt testdir2 ---------------使用move命令来移动文件(剪切)
    移动了 1 个文件。

    ===================

    C:UsersAdministrator>pushd f:music

    f:music>cd /d c:UsersAdministrator

    c:UsersAdministrator>

    -----------------------

    c:UsersAdministrator>netstat -an | find "3389"
    TCP 192.168.1.100:58878 192.168.1.202:3389 ESTABLISHED

  • 相关阅读:
    设置github使用的SSH key
    Github的两种协议SSH和HTTPS
    OSChina 周一乱弹 —— 为什么人类和人工智能定要一战
    OSChina 周一乱弹 —— 为什么人类和人工智能定要一战
    APP路由还能这样玩
    APP路由还能这样玩
    APP路由还能这样玩
    APP路由还能这样玩
    掘金技术社区沸点指南(试行版)
    掘金技术社区沸点指南(试行版)
  • 原文地址:https://www.cnblogs.com/rusking/p/4116787.html
Copyright © 2011-2022 走看看