Linux Commands Cheatsheet

Table of Contents

includes daily administrative actions

Disks

Badblocks

source

Just Check

sudo badblocks -sv /dev/sda

Check and Fix

  • This will check the whole disk and print out all bad blocks encountered on /dev/sda.
sudo badblocks -sv /dev/sda  > bad-blocks-result
sudo fsck -t ext4 -l bad-blocks-result /dev/sda1

S.M.A.R.T.

source

Overall Health

# su
smartctl -H /dev/<device>

S.M.A.R.T. data

source

  • TYPE: Pre-fail for attributes that are said to indicate impending failure, or Old_age for attributes that just indicate wear and tear.
# su
smartctl -a /dev/<device>

Make Filesystem

sudo mkfs.** /dev/<partition>
Nemo Xiong avatar
Nemo Xiong
我永远喜欢妃爱
comments powered by Disqus