查看完整版本 : badblocks 基本上可以取代 hd tune pro

gigighorge 2016-8-30 22:59

本身 windows hd tune pro 對我只有唯一用途.


就係 scan scan 下 surface 可以停左佢,
下次由呢度重新開始.


在登登比 Mr. A 問候完,
佢只係講左 badblocks.


不過我 google 完發現佢都可以 restart scan from last time.

[url=http://manpages.ubuntu.com/manpages/trusty/man8/badblocks.8.html]http://manpages.ubuntu.com/manpages/trusty/man8/badblocks.8.html[/url]


比佢狗屎撞棍 教左我一次。

"last block" "first block"

[b]badblocks[/b]  [  [b]-svwnfBX[/b]  ]  [ [b]-b[/b] [u]block-size[/u] ] [ [b]-c[/b] [u]blocks_at_once[/u] ] [ [b]-e[/b]       [u]max_bad_blocks[/u] ] [ [b]-d[/b] [u]read_delay_factor[/u]  ]  [  [b]-i[/b]  [u]input_file[/u]  ]  [  [b]-o[/b]       [u]output_file[/u] ] [ [b]-p[/b] [u]num_passes[/u] ] [ [b]-t[/b] [u]test_pattern[/u] ] [u]device[/u] [ [u]last-block[/u]       ] [ [u]first-block[/u] ][b]DESCRIPTION[/b]       [b]badblocks[/b] is used to search for bad blocks on a device (usually a  disk       partition).   [u]device[/u]  is  the  special file corresponding to the device       (e.g [u]/dev/hdc1[/u]).  [u]last-block[/u] is the last block to be checked; if it  is       not  specified,  the  last  block  on  the device is used as a default.       [u]first-block[/u] is an optional  parameter  specifying  the  starting  block       number for the test, which allows the testing to start in the middle of       the disk.  If it is not specified the first block on the disk  is  used       as a default.

ryanNL 2016-8-31 20:31

有冇用 -w

gigighorge 2016-8-31 22:06

你食屎o拉,

用 -n 唔好用 -w,

-w  會delete 左d file.

呢個c hing 心地唔好。

gigighorge 2016-8-31 22:07

[quote]原帖由 [i]ryanNL[/i] 於 2016-8-31 08:31 PM 發表 [url=http://computer.discuss.com.hk/redirect.php?goto=findpost&pid=447245318&ptid=26055314][img]http://computer.discuss.com.hk/images/common/back.gif[/img][/url]
有冇用 -w [/quote]

呢個c hing 真係好賤格 wor.

[b]-w[/b]     Use  write-mode  test. With this option, [b]badblocks[/b] scans for bad              blocks by writing some patterns  (0xaa,  0x55,  0xff,  0x00)  on              every block of the device, reading every block and comparing the              contents.  This option may not be combined with the  [b]-n[/b]  option,              as they are mutually exclusive.

ryanNL 2016-9-1 06:36

我都沒叫你用

ryanNL 2016-9-1 06:37

仲乜話我

gigighorge 2016-9-20 12:51

[url=http://dreamtails.pixnet.net/blog/post/27711987-badblocks-%E6%8C%87%E4%BB%A4%E7%AF%84%E4%BE%8B][url=http://dreamtails.pixnet.net/blog/post/27711987-badblocks-%E6%8C%87%E4%BB%A4%E7%AF%84%E4%BE%8B]http://dreamtails.pixnet.net/blog/post/27711987-badblocks-%E6%8C%87%E4%BB%A4%E7%AF%84%E4%BE%8B[/url][/url]

badblocks 指令檢測損壞磁區 (P.S. 讀寫次數龐大,常用會損害硬碟壽命)

語法:
badblocks [ -svwnf ] [ -b block-size ] [ -c blocks_at_once ] [ -e max_bad_blocks ] [ -d read_delay_factor ]
[-i input_file ] [ -o output_file ] [ -p num_passes ] [ -t test_pattern ] device [ last-block ] [ first-block ]

常用選項:
(default): non-destructive read-only mode 無損唯讀模式,較快。
-n: non-destructive read-write mode 無損讀寫模式,速度最慢。掛載中硬碟需加 -f 強制執行 (會有硬碟/檔案系統毀損的風險)
-w: destructive write test 毀滅性寫入測試。會將檔案全部抹銷!掛載中硬碟需加 -f 強制執行
-f: 強制執行,與 -n 或 -w 配合使用
-v: 執行中回報進度
-s: 將檢測出的壞磁區顯示在螢幕上
-i input_file: 略過不檢測 input_file 裡的已知 badblocks,這些已知 badblocks 同樣不會顯示在檢測結果中。
-o output_file: 將檢測出的 badblocks 寫在 output_file 上。

通常為求速度與資料安全,會使用預設的無損唯讀模式進行掃描。例如:
[color=Red]$ badblocks -v /dev/sda -o badblocks.txt[/color]

以上command為對 /dev/sda 進行無損唯讀模式掃描,-v 選項令 badblocks 在執行中回報進度,並以 -o 選項將檢測出的損壞磁區寫在 badblocks.txt 檔案裡。

gigighorge 2016-9-20 12:54

我自己:

$ badblocks -sv /dev/sda

有埋 "s", 看埋個prorgress.
同埋個 scan 係可以停左再resume, see #01
頁: [1]
查看完整版本: badblocks 基本上可以取代 hd tune pro