Powershell When exception is occured, Out-Null is actually not worked, so uses Get-ChildItem aaa >$null 2>&1 Or in Powershell 3 Get-ChildItem aaa *>$null Batch/Dos dir aaa >nul 2>&1
Tag: dos
DOS中通过chcp修改console code page
UTF-8格式的日志文件, DOS中通过type命令查看时显示乱码: C:\app\Manager\Log\RootManagerServer>type Root_20200527_135730_Trace.html 1590559051 0 0 Trace 0 0 Bind Port:Listen:8800<br> 1590559051 0 0 Trace 0 0 鏈嶅姟鍣ㄧ洃鍚鍙?8800<br> 1590559051 0 0 Trace 0 0 Bind Port:Listen:9800<br> 1590559051 0 0 Trace 0 0 瀹㈡埛绔洃鍚鍙?9800<br> 通过chcp命令修改code page为65001后显示正常: C:\app\Manager\Log\RootManagerServer>type Root_20200527_135730_Trace.html 1590559051 0 0 Trace 0 0 Bind Port:Listen:8800<br> 1590559051 0 0 Trace 0 0 服务器监听端口:8800<br> 1590559051 0 …