I went out with Zayd bin Sawhan and Salman bin Rabia, and I found a whip. (Ibn Numayr said in his version, "I picked up a whip and took it.")The two of them said, "Leave it."I replied, "I will not leave it for the wild beasts to devour. I will take it and make use of it."So I went to Ubayy bin Kaab and asked him about this, recounting the matter to him.He said, "You did well. During the time of the Messenger of Allah ﷺ, I found a purse containing a hundred dinars. I brought it to him, and he said to me, 'Announce it for a year.'So I announced it for a year, but I found no one who recognized it. Then I brought it to him again, and he said, 'Announce it for another year.'So I announced it, then brought it to him once more. He said, 'Announce it for yet another year,' and added, 'Take note of its number, its container, and its tie. If its owner comes and tells you the number, the container, and the tie, hand it over to him. Otherwise, make use of it.'"He said, "This is a good and authentic hadith."
حدثنا الحسن بن علي الخلال حدثنا عبد الله بن نمير ويزيد بن هارون عن سفيان الثوري عن سلمة بن كهيل
خرجت مع زيد بن صوحان وسلمان بن ربيعة فوجدت سوطا قال ابن نمير في حديثه فالتقطت سوطا فأخذته قالا دعه فقلت لا أدعه تأكله السباع لآخذنه فلأستمتعن به فقدمت على أبي بن كعب فسألته عن ذلك وحدثته الحديث فقال أحسنت وجدت على عهد رسول الله ﷺ صرة فيها مائة دينار قال فأتيته بها فقال لي عرفها حولا فعرفتها حولا فما أجد من يعرفها ثم أتيته بها فقال عرفها حولا آخر فعرفتها ثم أتيته بها فقال عرفها حولا آخر وقال أحص عدتها ووعاءها ووكاءها فإن جاء طالبها فأخبرك بعدتها ووعائها ووكائها فادفعها إليه وإلا فاستمتع بها قال هذا حديث حسن صحيح
Agreed upon by Bukhari and Muslim. Bukhari narrated it in the chapters on Conditions, in the chapter on Conditions in Endowments, no. 2737, and Muslim, no. 1632, from the hadith of Ibn Awn, with this wording.