zoukankan      html  css  js  c++  java
  • 常用Dos 命令

    telnet ip 端口号:检查端口是否打开

    netstat -an:查看已打开的所有端口

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

    获取日期和时间

    C:\>echo %date%

    Wed 11/13/2013

    C:\>echo %time%
    12:32:37.89

    C:\>echo %date:~0,3%
    Wed

    %date%是一个参数,后面带的~0,3表示取值范围

    ~表示从环境变量的内容的左边开始,~m,n: m表示从第m个字符开始,n表示取n个字符

    ~0,3意思是从头开始取3个字符,所以为Wed

    C:\>echo %date:~-4%

    2013 

    ~-4: 负数代表倒数,也就取最后4个字符

    C:\>echo %date:~-7,-5%
    13

    ~-7,-5: 取最后7个字符,并且不显示其中最后5个

    C:\>echo %date:~-7,5%
    13/20

    ~-7,5: 取最后7个字符,并且不显示其中前5个

    C:\>echo %date:~-4%-%date:~-7,-5%-%date:~-10,-8% %time:~0,2%_%time:~3,2%_%time:~6,2%

    2013-13-11 12_29_44

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

     Tzutil: Displays the Windows Time Zone Utility. For more details, see http://technet.microsoft.com/en-us/library/hh875624.aspx

      tzutil [/?] [/g] [/s <TimeZoneID>[_dstoff]] [/l]

    ParameterDescription

    /?

    Displays Help at the command prompt.

    /g

    Displays the current time zone ID.

    /s <TimeZoneID>[_dstoff]

    Sets the current time zone using the specified time zone ID. The _dstoff suffix disables Daylight Saving Time adjustments for the time zone (where applicable).

    /l

    Lists all valid time zone IDs and display names. The output will be:

    • <display name>
    • <time zone ID>
  • 相关阅读:
    MySQL 复制表结构和表数据
    学习使用Guava Retryer
    Maven 常用工具类整理
    转 全面理解Javascript闭包和闭包的几种写法及用途
    Python的全局变量
    python的内存管理机制
    Python 隔离沙箱 virtualenv
    <script> 的defer和async
    高性能Javascript(2) DOM编程
    高性能Javascript(1)
  • 原文地址:https://www.cnblogs.com/jenneyblog/p/DosCommands.html
Copyright © 2011-2022 走看看