سؤال

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