Linux Commands Cheatsheet
Table of Contents
includes daily administrative actions
Disks
Badblocks
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.
Overall Health
# su
smartctl -H /dev/<device>
S.M.A.R.T. data
TYPE
:Pre-fail
for attributes that are said to indicate impending failure, orOld_age
for attributes that just indicate wear and tear.
# su
smartctl -a /dev/<device>
Make Filesystem
sudo mkfs.** /dev/<partition>