Hadithcore
Sunan Abi Dawud, 4982
sahih· Al-Albani

Abu al-Malih reported on the authority of a man :

I was riding on a mount behind the prophet (ﷺ). It stumbled. Thereupon I said: May the devil perish! He said: do not say; may the devil perish! For you say that, he will swell so much so that he will be like a house, and say: by my power. But say: in the name of Allah; for when you say that, he will diminish so much so that he will be like a fly.

حَدَّثَنَا وَهْبُ بْنُ بَقِيَّةَ، عَنْ خَالِدٍ، - يَعْنِي ابْنَ عَبْدِ اللَّهِ - عَنْ خَالِدٍ، - يَعْنِي الْحَذَّاءَ - عَنْ أَبِي تَمِيمَةَ، عَنْ أَبِي الْمَلِيحِ، عَنْ رَجُلٍ، قَالَ كُنْتُ رَدِيفَ النَّبِيِّ صلى الله عليه وسلم فَعَثَرَتْ دَابَّتُهُ فَقُلْتُ تَعِسَ الشَّيْطَانُ ‏.‏ فَقَالَ ‏

‏ لاَ تَقُلْ تَعِسَ الشَّيْطَانُ فَإِنَّكَ إِذَا قُلْتَ ذَلِكَ تَعَاظَمَ حَتَّى يَكُونَ مِثْلَ الْبَيْتِ وَيَقُولَ بِقُوَّتِي وَلَكِنْ قُلْ بِسْمِ اللَّهِ فَإِنَّكَ إِذَا قُلْتَ ذَلِكَ تَصَاغَرَ حَتَّى يَكُونَ مِثْلَ الذُّبَابِ ‏

‏ ‏.‏

References2 variants
In-Book Reference
Book 43, Hadith 210
English Reference
Book 42, Hadith 4964