編碼 十進制
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 =""