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