Read every file stored on device or SD card? Flash storage devices (NAND cells) are nutorious for slowly losing charge over time.

Many USB sticks have automatic data retention when idle, but I doubt that MicroSD has automatic data retention.

How do I read every single file saved on the mSD card?
One possible way is installing an Android terminal emulator such as Termux or jackpal.androidterm (which I have).


cd /storage/extSdCard/
cp -R -v . /dev/null


-v adds verbosity and shows which file is being read momentarily. “extSdCard” might be ####-#### (hexadecimal characters such as 0612-2FA5).

/dev/null is a black hole in Unix/Linux based operating systems. Everything put in there is gone. But what the command does is copying all the files into nothing, hence the source files stay the same, just getting read.



Alternatives:

grep -R "Any Text" #if working directory is already selected using the “cd” command.


Or grep -R "Any Text" /storage/[path to MicroSD card]

This will quickly search every file recrusively for text, causing all data to get read.

You can also redirect the output of the command to >>/dev/null or >>/dev/zero.



Another alternative is using a hashsum generating command (md5sum needs the lowest processing ressources for the same amount of data), but that's less efficient because it needs to generate a hashsum. This process requires additional system ressources.