Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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!

like image 969
Mr. B. Avatar asked Sep 13 '17 04:09

Mr. B.


People also ask

How to find a file in Linux?

One of the most powerful file searching tools in the Linux system is the “find command.” It searches the entire directory for files and folders to get matched with the user’s expression and performs actions on these files. File permission, file size, type are some other factors based on finding files on Linux.

How to find a human-readable file using file in Linux?

How To Find A Human-readable File Using File In Linux? – Systran Box How To Find A Human-readable File Using File In Linux? This command displays the average size (byte) of a file by default. To produce a more meaningful representation of human readable output, turn to -h; this converts ng bytes into KB, MB, GB and etc.

How to zip files and directories in Linux?

Zip files can be easily extracted in Windows, macOS, and Linux using the utilities available for all operating systems. In this tutorial, we will show you how to Zip (compress) files and directories in Linux using the zip command. zip is a command-line utility that helps you create Zip archives.

What does not mean in Linux find command?

This Linux find command using the “not” operator creates a list of all files not ending with the.html file extension (filename pattern). Also, if you’re not familiar with it, the -f argument in that find command means “just look for files,” and don’t return search results for directories.


1 Answers

you can use

find . ! -readable

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

like image 78
Picaud Vincent Avatar answered Nov 15 '22 04:11

Picaud Vincent