How to make du
command throw input/output error
. For some reason, I want to reproduce this use case and want to verify my fix before changes pushed to production. I am not able to understand how to reproduce this use case. I tried so many thing, but no luck. Any other command also fine which throws input/output error for file system.
E.g.
du -sh /data/
du: cannot access '/data/': Input/output error