[root@linux ~]# md5sum filename
[root@dywHome2 SOURCES]# md5sum kplayer-0.5.3.systray.tar.gz b907112f049c3c46664b4eab042f545e kplayer-0.5.3.systray.tar.gz
[root@dywHome2 SOURCES]# md5sum kplayer-0.5.3.systray.tar.gz > kplayer.md5
[root@dywHome2 SOURCES]# cat kplayer.md5 b907112f049c3c46664b4eab042f545e kplayer-0.5.3.systray.tar.gz
[root@dywHome2 SOURCES]# vi readme [root@dywHome2 SOURCES]# cat readme kplayer-0.5.3.systray.tar.gz kplyaer source codes tarball kplayer.md5 md5sum file
[root@dywHome2 SOURCES]# md5sum readme >> kplayer.md5
[root@dywHome2 SOURCES]# cat kplayer.md5 b907112f049c3c46664b4eab042f545e kplayer-0.5.3.systray.tar.gz 761adab1a7b0bc9fb2b60542137ee335 readme
[root@linux ~]# md5sum [-bct] filename 選項: -b :使用 binary 的讀檔方式,預設為 Windows/DOS 檔案型態的讀取方式; -c :檢驗 md5sum 檔案指紋; -t :以文字型態來讀取 md5sum 的檔案指紋。
[root@dywHome2 SOURCES]# md5sum readme 761adab1a7b0bc9fb2b60542137ee335 readme [root@dywHome2 SOURCES]# md5sum -b readme 761adab1a7b0bc9fb2b60542137ee335 *readme [root@dywHome2 SOURCES]# md5sum -t readme 761adab1a7b0bc9fb2b60542137ee335 readme
[root@dywHome2 SOURCES]# md5sum -c kplayer.md5 kplayer-0.5.3.systray.tar.gz: OK readme: OK
[root@dywHome2 SOURCES]# vi readme [root@dywHome2 SOURCES]# cat readme kplayer-0.5.3.systray.tar.gz kplyaer: source codes tarball kplayer.md5: md5sum file
[root@dywHome2 SOURCES]# md5sum -t readme 5a4d99c2a9b759dca679c2c1001cf8d4 readme
[root@dywHome2 SOURCES]# md5sum -c kplayer.md5 kplayer-0.5.3.systray.tar.gz: OK readme: FAILED md5sum: WARNING: 1 of 2 computed checksums did NOT match
[root@dywHome2 rpm]# wget ftp://ftp.isu.edu.tw/Linux/Mandriva /official/2007.0/i586/media/main/updates/media_info/MD5SUM --20:57:43-- ftp://ftp.isu.edu.tw/Linux/Mandriva /official/2007.0/i586/media/main/updates/media_info/MD5SUM => `MD5SUM' Resolving ftp.isu.edu.tw... 140.127.177.15, 140.127.177.17 Connecting to ftp.isu.edu.tw|140.127.177.15|:21... connected. Logging in as anonymous ... Logged in! ==> SYST ... done. ==> PWD ... done. ==> TYPE I ... done. ==> CWD /Linux/Mandriva/official/2007.0/i586/media/main/updates/media_info ... done. ==> PASV ... done. ==> RETR MD5SUM ... done. Length: 98 (unauthoritative) 100%[===============================================>] 98 --.--K/s 20:57:49 (51.26 KB/s) - `MD5SUM' saved [98]
[root@dywHome2 rpm]# cat MD5SUM 374fca8ea858a7079c3717acca208e47 hdlist.cz 38b6616b9514707ff8dc344eadd5468f synthesis.hdlist.cz
[root@dywHome2 rpm]# wget ftp://ftp.isu.edu.tw/Linux/Mandriva /official/2007.0/i586/media/main/updates/media_info/hdlist.cz --20:58:30-- ftp://ftp.isu.edu.tw/Linux/Mandriva /official/2007.0/i586/media/main/updates/media_info/hdlist.cz => `hdlist.cz' Resolving ftp.isu.edu.tw... 140.127.177.15, 140.127.177.17 Connecting to ftp.isu.edu.tw|140.127.177.15|:21... connected. Logging in as anonymous ... Logged in! ==> SYST ... done. ==> PWD ... done. ==> TYPE I ... done. ==> CWD /Linux/Mandriva/official/2007.0/i586/media/main/updates/media_info ... done. ==> PASV ... done. ==> RETR hdlist.cz ... done. Length: 21,737,096 (21M) (unauthoritative) 100%[===============================================>] 21,737,096 102.50K/s ETA 00:00 21:02:04 (99.67 KB/s) - `hdlist.cz' saved [21737096] [root@dywHome2 rpm]# wget ftp://ftp.isu.edu.tw/Linux/Mandriva /official/2007.0/i586/media/main/updates/media_info/synthesis.hdlist.cz --21:02:21-- ftp://ftp.isu.edu.tw/Linux/Mandriva /official/2007.0/i586/media/main/updates/media_info/synthesis.hdlist.cz => `synthesis.hdlist.cz' Resolving ftp.isu.edu.tw... 140.127.177.17, 140.127.177.15 Connecting to ftp.isu.edu.tw|140.127.177.17|:21... connected. Logging in as anonymous ... Logged in! ==> SYST ... done. ==> PWD ... done. ==> TYPE I ... done. ==> CWD /Linux/Mandriva/official/2007.0/i586/media/main/updates/media_info ... done. ==> PASV ... done. ==> RETR synthesis.hdlist.cz ... done. Length: 156,870 (153K) (unauthoritative) 100%[===============================================>] 156,870 99.67K/s 21:02:24 (99.44 KB/s) - `synthesis.hdlist.cz' saved [156870]
[root@dywHome2 rpm]# cat MD5SUM 374fca8ea858a7079c3717acca208e47 hdlist.cz 38b6616b9514707ff8dc344eadd5468f synthesis.hdlist.cz [root@dywHome2 rpm]# md5sum -b hdlist.cz 374fca8ea858a7079c3717acca208e47 *hdlist.cz [root@dywHome2 rpm]# md5sum -t hdlist.cz 374fca8ea858a7079c3717acca208e47 hdlist.cz
[root@dywHome2 rpm]# md5sum -c MD5SUM hdlist.cz: OK synthesis.hdlist.cz: OK