I heard the Messenger of Allah ﷺ say, "Knowledge comes only through learning, and forbearance comes only through practicing forbearance. Whoever seeks the good will be granted it, and whoever guards himself against evil will be protected from it."
سمعت رسول الله ﷺ يقول: إنما العلم بالتعلم، وإنما الحلم بالتحلم، ومن يتحر الخير يعطه، ومن يتوق الشر يوقه.
No references are available.
Khatib Baghdadi related it in his Tarikh (10/185) from Ali bin Ahmad Razzaz, who said, Abdul-Samad bin Ali Tustee told us, who said, Ahmad bin Bishr bin Saad Marthadi told us, who said, Saad bin Zanbur told us, who said, Ismail bin Mujalid told us, from Abdul-Malik bin Umayr, from Raja bin Haywa, from Abu Hurairah, and he related it.Its chain is hasan, because of Ali bin Ahmad Razzaz and Ismail bin Mujalid, for both of them are truthful narrators.On this subject there is also what was related from Muawiya bin Abu Sufyan, who said, while delivering a sermon from the pulpit, "I heard the Messenger of Allah ﷺ say, 'O people, knowledge comes only through learning, and understanding comes only through seeking to understand, and whoever Allah wishes good for, He grants him understanding of the religion. Allah is feared by His servants only the scholars among them. A group from my nation will always remain manifest upon the truth, caring nothing for those who oppose them or those who stand against them, until the command of Allah comes while they are still manifest.'"Bayhaqi related it in Madkhal (352), and Khatib in Faqih wal-Mutafaqqih (12), both of them through the hadith of Abu Abbas Muhammad bin Yaqub bin Yusuf Assam, who said, Abbas bin Walid bin Mazyad Bayruti informed me, who said, Muhammad bin Shuayb bin Shabur informed me, from Utba bin Abu Hakeem Hamdani, from Makhul, that he related it to him from Muawiya bin Abu Sufyan, and he related the hadith.Its chain has a break, for Makhul did not hear from Muawiya bin Abu Sufyan, as Abu Hatim said. Some of its passages have sahih supporting evidence.On this subject there is also what was related from Abu Darda. Khatib related it (6/442), and Abu Naeem in Hilya (5/174), and Sakhawi attributed it in Maqasid Hasana (210) to Tabarani in Kabir, and also to Askari, all of them through the route of Muhammad bin Hasan bin Yazid Hamdani.Abu Naeem said, "It is unusual as a hadith of Thawri from Abdul-Malik, related only by Muhammad bin Hasan."Sakhawi said in Maqasid Hasana, "Muhammad bin Hasan is a liar, and Bayhaqi related it in Madkhal through another route as stopped at Abu Darda."I say, he overlooked the hadith of Abu Hurairah, and did not mention it.