I'm looking for a way to check if the entire binary contents of a USB device are purely 0s.
I'm trying this command:
sudo xxd /dev/sdb | uniq but it has no output and just runs forever.
I've considered the Sort command, but my understanding is that it requires a file to read rather than just the standard terminal output.
update: I realised I could check with
sudo xxd -a /dev/sdb, but my question still stands: is there a way to uniquely sort output of the terminal without saving it to a file first?