2017-11-22 2 views
0

비슷한 질문이 이미 제기되었지만 답변에 만족하지 않았습니다. 실제로 Unix find 명령을 사용하고 싶습니다. 사용하는 find 명령은 -maxdepth 옵션을 허용하지 않습니다. 그러나 옵션 -depth가 있지만 만족스럽지 않게 사용하지 못했습니다. 나는 ksh 쉘을 사용한다.Unix 명령 find를 사용하여 방문한 디렉토리의 깊이를 제한하는 방법은 무엇입니까?

+4

무엇을 시도했으며 결과가 불만족 스럽습니까? –

+0

'-depth'는 에러를 주거나 잘못된 결과를 반환합니까, 아니면 ...? – roelofs

+0

이 링크는 도움이됩니까? https://www.unix.com/shell-programming-and-scripting/65786-controlling-depth-find.html? '깊이'는 실제로 당신이 묵시적으로 한 일을하지 않을 수도 있음을 시사합니다. – roelofs

답변

0

는 그래서 인수를 허용하지 않습니다 find manual

-depth Always evaluates to the value True. Causes the descent of the 
directory hierarchy to be done so that all entries in a directory are 
affected before the directory itself is affected. It can be useful  
when the find command is used with the cpio command to transfer files 
that are contained in directories without write permission. 

를 참조하십시오.

+0

예,이 옵션은 find 명령이 지정된 깊이 수준의 레벨 만 처리하는 데 도움이되지 않습니다. – Martin

관련 문제