Sunan Abi Dawud 5258
The tradition mentioned above has also been transmitted by Ibn 'Ajilan through a different chain of narrators briefly. This version has:
He should give it a warning three times. If it appears to him after that, he should kill it, for it is a devil.
حَدَّثَنَا مُسَدَّدٌ، حَدَّثَنَا يَحْيَى، عَنِ ابْنِ عَجْلاَنَ، بِهَذَا الْحَدِيثِ مُخْتَصَرًا قَالَ ‏
"‏ فَلْيُؤْذِنْهُ ثَلاَثًا فَإِنْ بَدَا لَهُ بَعْدُ فَلْيَقْتُلْهُ فَإِنَّهُ شَيْطَانٌ ‏"‏ ‏.‏