Search code examples
linuxterminalserverzipadmin

Linux (zip): how to find all files that are not readable?


I just tried to zip folder and it's content by this command:

zip -r ./mytarget.zip ./mysource

At the end I got the warning:

zip warning: Not all files were readable
files/entries read:  141595 (4.2G bytes)  skipped:  57 (1.8M bytes)

I'd like to know which files were skipped.

How can I find all the files that were not readable? I don't have sudo rights on that server.

Thanks in advance!


Solution

  • you can use

    find . ! -readable
    

    to recursively scan for unreadable files or directories. This command takes into account permissions, but also broken links.