dimanche 6 mars 2016

Linux fill all files recursivelly with rando or pseudo random data

I want to fill with random bytes ALL files RECURSIVELLY from the root directory. ONLY FILES, folders are to be left untoutched

I DON´T WANT TO DELETE the files, just fill them with random bytes

In my research, the fill command for a single file could be something like:

dd if=/dev/random of=target-files bs=1M

And to find all files recursivelly I should use:

find . -name "* .*"

My questions are:

  1. Is it possible to achieve my goal by joining this two commands? (pipe them? how?)

  2. Is there another easier way to achieve the same results?

Thanks for any help ;-)




Aucun commentaire:

Enregistrer un commentaire