sudo badblocks -f -b 4096 -p 1 -nsv /dev/*drive or partition* (spinning disks only)

For SSD’s you only need to read but not rewrite as the ssd controller handles rewriting badblocks automatically

This is done with this command

grep -r [search term ] /[location]

For example say the drive is mounted at /mnt/drive then

grep -r data /mnt/drive Will refresh the drive the search term can be anything and is not important