‘Alee ibn Abee Taalib (radhi Allaahu anhu) said to Kumail ibn Ziyaad,
Knowledge is better than wealth. Knowledge is a protection for you, whereas it is you that has to protect wealth. The zakaat of knowledge is action, whereas spending decreases wealth. And love of the Scholar is part of the Religion. Knowledge brings about obedience for the Scholar in his own lifetime and causes him to have good repute after his death, whereas the benefit of wealth ceases when it passes away. The hoarders of wealth have died even though they are still alive, whereas the Scholars remain for as long as time remains – their persons are lost, but their examples remain in the hearts.
Reported by Abu Nu’aym in Hilyatul-Awliyaa (1/79-80), al-Khateeb al-Baghdaadee in al-Faqeeh wal-Mutafaqqih (1/49-50) and Ibn Katheer in al-Bidaayah wan-Nihaayah (9/47).