I don't think it's a good idea to systematically use -z, it doesn't improve anything and if you are encrypting your disk it reveals which and how many sectors actually contain encrypted data. The reason for -n1 is because erasing your disk 3 times (default value) is completely useless, you are wasting time and resources for no added value.
This is a typical useless use of cat. You should better directly use grep:
Furthermore, as already suggested, you should better retrieve the first log entry using
head -n1.For shred, I would recommend this one instead:
I don't think it's a good idea to systematically use -z, it doesn't improve anything and if you are encrypting your disk it reveals which and how many sectors actually contain encrypted data. The reason for -n1 is because erasing your disk 3 times (default value) is completely useless, you are wasting time and resources for no added value.