Language:
كتاب التمنى
94  
Wishes
(5)
Chapter: To wish for the Qur'an and knowledge
(5)
باب تَمَنِّي الْقُرْآنِ وَالْعِلْمِ
Sahih al-Bukhari 7232

Narrated Abu Huraira:

Allah's Messenger (ﷺ) said, "Not to wish to be the like except of two men. A man whom Allah has given the (knowledge of the) Qur'an and he recites it during the hours of night and day and the one who wishes says: If I were given the same as this (man) has been given, I would do what he does, and a man whom Allah has given wealth and he spends it in the just and right way, in which case the one who wishes says, 'If I were given the same as he has been given, I would do what he does.' " (See Hadith 5025 and 5026)

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

حَدَّثَنَا قُتَيْبَةُ، حَدَّثَنَا جَرِيرٌ، بِهَذَا‏.‏

Reference : Sahih al-Bukhari 7232
In-book reference : Book 94, Hadith 7
USC-MSA web (English) reference : Vol. 9, Book 90, Hadith 338
  (deprecated numbering scheme)