Allah tells us about Musa (as) when he was looking for Khadir:
وَإِذْ قَالَ مُوسَىٰ لِفَتَاهُ لَا أَبْرَحُ حَتَّىٰ أَبْلُغَ مَجْمَعَ الْبَحْرَيْنِ أَوْ أَمْضِيَ حُقُبًا
And (remember) when Musa (Moses) said to his boy-servant: “I will not give up (travelling) until I reach the junction of the two seas or (until) I spend years and years in travelling.”
The word حقب means a long time or some said it means 70/80 years! This is to look for man he was told who has more ilm than him! A Prophet lowering himself in such a way!
Whoever takes a path to seeking ilm the path to Jannah is made easier for him as mentioned by the Prophet صلى الله عليه و سلم.