find command displays unexpected results
I was trying to find all symlinks under a specific folder to do this i used:-
find /bar/foo/ -type l
This works fine on the most part and produced expected results appart from one of the results returned was very odd...output something like...
Get the meaning?? everything was returning from inside /bar/foo as i would expect apart from this one line which appears to have come from somewhere completely different and i've not been able to even find the location yet as there is no such place as:-
As in not possible to go "cd /nothing/to/do/......"
What is happening in this output???
If possible, please copy paste the actual command and the actual results. As you describe it, it looks weird, but maybe you are missing something that a fresh pair of eyes can spot, given the original data.
The default behavior of find is not following the symbolic link...so if i am not misunderstand your text, how about use -L option of find to force find utility to follow the symbolic link
Weird looks like my reply to this was lost from earlier...hmmm
anyway, the problem was found it was to do with a directory that had been named for some reason accedently ?
don't know why naming a dir ? would cause the problem and i'd be happy for someone to tell me if they know???
? can be used as a wild card in a file or directory name. So maybe the directory name ? came about by somebody trying to use a wild card name inappropriately.
Similarly maybe the find command uses some other command to follow the link and the subcommand trips over the ? by treating it as a wildcard.
Hi There, i think that sounds about right...it certainly looked like it was not working correctly even when trying to traverse back out of the folder to the top of the tree (so to speak). That it wasn't possible to do cd ../../
It would fail with some weird error....anyway sorted now thanks for the info
|All times are GMT -5. The time now is 01:00 AM.|