Language:
كتاب الأدب
78  
Good Manners and Form (Al-Adab)
(120)
Chapter: One may scrape up the ground
(120)
باب الرَّجُلِ يَنْكُتُ الشَّىْءَ بِيَدِهِ فِي الأَرْضِ
Sahih al-Bukhari 6217

Narrated `Ali:

We were with the Prophet (ﷺ) in a funeral procession, and he started scraping the ground with a small stick and said, "There is none amongst you but has been assigned a place (either) in Paradise and (or) in the Hell-Fire." The people said (to him), "Should we not depend upon it?" He said: carry on doing (good) deeds, for everybody will find easy such deeds as will lead him to his destined place. He then recited: "As for him who gives (in charity) and keeps his duty to Allah.." (92.5)

حَدَّثَنَا مُحَمَّدُ بْنُ بَشَّارٍ، حَدَّثَنَا ابْنُ أَبِي عَدِيٍّ، عَنْ شُعْبَةَ، عَنْ سُلَيْمَانَ، وَمَنْصُورٍ، عَنْ سَعْدِ بْنِ عُبَيْدَةَ، عَنْ أَبِي عَبْدِ الرَّحْمَنِ السُّلَمِيِّ، عَنْ عَلِيٍّ ـ رضى الله عنه ـ قَالَ كُنَّا مَعَ النَّبِيِّ صلى الله عليه وسلم فِي جَنَازَةٍ فَجَعَلَ يَنْكُتُ الأَرْضَ بِعُودٍ، فَقَالَ ‏"‏ لَيْسَ مِنْكُمْ مِنْ أَحَدٍ إِلاَّ وَقَدْ فُرِغَ مِنْ مَقْعَدِهِ مِنَ الْجَنَّةِ وَالنَّارِ ‏"‏‏.‏ فَقَالُوا أَفَلاَ نَتَّكِلُ قَالَ ‏"‏ اعْمَلُوا فَكُلٌّ مُيَسَّرٌ ‏"‏‏.‏ ‏{‏فَأَمَّا مَنْ أَعْطَى وَاتَّقَى‏}‏ الآيَةَ‏.‏
Reference : Sahih al-Bukhari 6217
In-book reference : Book 78, Hadith 241
USC-MSA web (English) reference : Vol. 8, Book 73, Hadith 236
  (deprecated numbering scheme)