K
K
khodos_dmitry2020-04-20 20:35:49
linux
khodos_dmitry, 2020-04-20 20:35:49

Why did you specify the -maxdepth switch after the argument without the -type switch, and the keys are not positional (-maxdepth affects the tests specified as before?

I'm trying to run a query:

find /home/book/book.ru/uploads/compress -type d -maxdepth 3 -mindepth 3

As a result, I get an error:
warning: you specified the -maxdepth key after the argument without the -type key, and the keys are not positional (-maxdepth affects the tests specified both before and after it). Specify keys before other arguments.
I figured out what to do:
find /home/book/book.ru/uploads/compress -maxdepth 3 -mindepth 3 -type d

But why the error?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
jcmvbkbc, 2020-04-20
@jcmvbkbc

This is not an error but a warning. Warns that other versions of find that adhere to the standard may consider this a bug. Portability concerns.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question