문제

I did a recursive grep in current directory by following command.

grep -r -s <searchterm> .

But it says on output lines but all but on some output lines as below.

 Traversal results in a loop.

Please help.

도움이 되었습니까?

해결책

The -r flag follows symbolic links which may result in an infinite loop in cases when an inner directory is a symbolic link to an outer one. You can use the -R flag to not follow symbolic links. On the other hand, the error harmless. If you want to follow symbolic links use -r and let grep warn you when a possible cycle is detected.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top