Find a file based on specifications

Maybe this is a duplicate but how do I find a file (that I don't know the name of) based on some specifications?

For example how do I find a file that:

  • Is human-readable
  • Has exactly 1033 bytes in size
  • Is not executable

In a certain directory with tons of files, some executable and some non human-readable?

4

1 Answer

Thanks to Terrance's comment, I found the answer.

You can simply do find -readable -size 1033c, that finds a readable file with the size of 1033 bytes.

4

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like