Abbad bin Shurahbil reported,

A year of drought struck me, so I entered one of the gardens of Madinah, rubbed some ears of grain, ate from them, and carried some away in my garment. The owner of the garden came, beat me, and took my garment.I went to the Messenger of Allah ﷺ, who said to the man, "You did not teach him when he was ignorant, nor did you feed him when he was hungry," or he said, "starving."He ordered him to return my garment to me and gave me a wasq, or half a wasq, of food.

Abu Dawud 2620

Sahih

حدثنا عبيد الله بن معاذ العنبري حدثنا أبي حدثنا شعبة عن أبي بشر

عن عباد بن شرحبيل قال

أصابتني سنة فدخلت حائطا من حيطان المدينة ففركت سنبلا فأكلت وحملت في ثوبي فجاء صاحبه فضربني وأخذ ثوبي فأتيت رسول الله ﷺ فقال له ما علمت إذ كان جاهلا ولا أطعمت إذ كان جائعا أو قال ساغبا وأمره فرد علي ثوبي وأعطاني وسقا أو نصف وسق من طعام

أبو داود 2620صحيح
Contents
Reference
Commentary
Ayat
Collection
Sunan Abu Dawud
Book
Jihad
Chapter
Traveler may eat dates and drink milk when passing by them
Numbering
Darussalam 2620
Abu Dawud 2620