• 用cmd打开TXT(中文)文件,以及创建空文件,删除文件,改变输入法


    编码               十进制

    ut-8                65001

    GBK               936

    美国英语        437

    windows cmd 默认为GBK

    我这有一个本地a.TXT, 以及一个从网上下载的b.txt.

    首先   cd 到两个文件所在目录

    然后打开两个文件

    可以看到本地文件正常显示

    而从网上下载的为乱码(因为编码为utf-8)

    更改cmd编码方式

    更改完成

    再次打开两个文件呢

    这次a.txt变成了乱码

     而b.txt 则变成了简体中文

    原因在于chcp 65001

    但这种变换方式只是临时的!!!!!!

    关于创建一个新文件: type nul > abc.txt 这样就创建了一个名为abc.txt 的文件

    删除文件 :  del abc.txt 这样就删除了名为abc.txt 的文件

    如果要在 cmd 命令行下输入中文, 按住 Ctrl + Shift 就可以,我的是win10 的系统。

    一些基本的命令:

    shutdown the computer after 10 seconds:

    shutdown /s /t 10

    bibernation the computer with forcing the complication to be close:

    shutdown /h /f

    restart the computer after 10 seconds:

    shutdown /r /t 10

    start the firefox.exe:

    start firefox.exe

    start a webpage :

    start http://..............

    show WIFI used:

    netsh wlan show profiles

    show the secret which have been used"

    netsh wlan show profile name  ="" key = clear

    connect the WIFi:

    netsh wlan connect name =""

  • 相关阅读:
    javascript ext 闭包
    Hibernate HQL from superclass 问题
    sql查询按in顺序排序显示数据 oracle
    Hibernate createSQLquery()
    sql 分页
    javasript 闭包测试
    Excel 批量快速导入mySQL 解决方案~~
    C# 注册COM+组件步骤~
    QT错误集锦~
    QuartzNet Test~~
  • 原文地址:https://www.cnblogs.com/zijidefengge/p/11301273.html
Copyright © 2020-2023  润新知