Samrtctl commands for batch testing
for dev in /dev/sd[a-d]; do sudo smartctl -t short $dev; done for dev in $(smartctl --scan | awk '{print $1}'); do echo "--- Report for $dev ---"; sudo smartctl -A $dev; done for dev in /dev/sd[a-d]; do echo "==================================================" echo "DEVICE: $dev" # Print Model and Serial sudo smartctl -i $dev | grep -E "Model Family|Device Model|Serial Number" echo "--- Critical Attributes ---" # Show Reallocated Sectors (5), Pending (197), and UDMA CRC (199) sudo smartctl -A $dev | grep -E "ID#|Reallocated_Sector_Ct|Current_Pending_Sector|UDMA_CRC_Error_Count" echo "--- Latest Test Result ---" # Show the #1 (most recent) entry from the self-test log sudo smartctl -l selftest $dev | grep -A 1 "Num Test_Description" | tail -n 1 done for dev in /dev/sd[a-d]; do echo "==...