The iron cobra knows the location of a specific target creature as long as that creature is within 1 mile of it. If the creature is moving, it knows the direction if that creature's movement. If the target is beyond this distance, the iron cobra can't locate the target creature.