湖濱散記部落格的樹心幽徑[login][主頁]
504:20190930在windows命令提示字元下用Hexdump來觀察文字檔案

(1)自如下網址下載Hexdump.zip並解壓安裝到d碟中:

https://www.di-mgt.com.au/hexdump-for-windows.html hexdump-for-windows

(2-0)執行windows的cmd啟用命令提示字元,出現如下訊息

Microsoft Windows [版本 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\kmvs0117>


(2-1)輸入切換工作磁碟至d碟指令 「 d:
C:\Users\kmvs0117>d:

D:\>

(2-2)輸入切換工作目錄指令「 cd hexdump-2.0.0」
D:\>cd hexdump-2.0.0

D:\hexdump-2.0.0>

(2-3)

D:\hexdump-2.0.0>dir
 磁碟區 D 中的磁碟是 Data
 磁碟區序號:  AE1E-2558

 D:\hexdump-2.0.0 的目錄

2017/07/02  上午 03:44    <DIR>          .
2017/07/02  上午 03:44    <DIR>          ..
2017/07/02  上午 03:40            93,664 hexdump.exe
2017/07/02  上午 03:46             2,922 README.md
2017/07/02  上午 03:44    <DIR>          TEST
               2 個檔案          96,586 位元組
               3 個目錄  543,956,463,616 位元組可用

D:\hexdump-2.0.0>

(2-4)用copy con 指令來建立文字檔案a.txt ( F6鍵加入檔尾符號^Z並儲存及結束建檔)。

D:\hexdump-2.0.0>copy con a.txt
123
456
^Z
複製了         1 個檔案。

(2-5) D:\hexdump-2.0.0>dir
:

2019/09/30  上午 08:53                10 a.txt

:

(2-6)

D:\hexdump-2.0.0>type a.txt
123
456

(2-7) 以16進位數顯示檔案內容: 

D:\hexdump-2.0.0>hexdump a.txt
000000  31 32 33 0d 0a 34 35 36 0d 0a

(2-8)以16進位數及對應的文字字元顯示檔案內容:

D:\hexdump-2.0.0>hexdump -C a.txt
000000  31 32 33 0d 0a 34 35 36 0d 0a                    123..456..



select id,article_id,topic,text from lt_articles_text where article_id =504; ok. update lt_articles set num_reads=num_reads +1 where id=504; ok.