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.
grep : Traversal results in a loop
Domanda
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.
Soluzione
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow