وعنده مفاتح الغيب ﻻ يعلمها إﻻ هو
And with Him are the keys of the Ghayb (all that is hidden), none knows them but He.
Al-Bukhari recorded that Salim bin Abdullah said that his father said that the Messenger of Allah said,
مفاتيح الغيب خمس ﻻ يعلمهن إﻻ الله
The keys of the Unseen are five and none except Allah knows them:
إن الله عنده علم الساعة
وينزل الغيث
ويعلم ما فى اﻻرحام
وما تدرى نفس ماذا تكسب غدا
وما تدرى نفس بٲى أرض تموت إن الله عليم خبير
Verily, Allah! With Him (Alone) is the knowledge of the Hour,
He sends down the rain,
and knows that which is in the wombs.
No person knows what he will earn tomorrow,
and no person knows in what land he will die.
Verily, Allah is All-Knower, All-Aware.'' (31:34)
Allah's statement,
ويعلم ما في البر والبحر
And He knows whatever there is on the land and in the sea;
means, Allah's honored knowledge encompasses everything, including the creatures living in the sea and on land, and none of it, not even the weight of an atom on earth or in heaven, ever escapes His knowledge.
Allah's statement,
وما تسقط من ورقة إﻻ يعلمها
not a leaf falls, but He knows it.
means, He knows the movements of everything including inanimate things. Therefore, what about His knowledge of the living creatures, especially, those whom the Divine laws have been imposed upon such as mankind and the Jinns.
In another Ayah, Allah said;
يعلم خاينة اﻻعين وما تخفى الصدور
Allah knows the fraud of the eyes, and all that the breasts conceal. (40:19)
وﻻ حبة في ظلمات اﻻرض وﻻ رطب وﻻ يابس إﻻ في كتاب مبين
There is not a grain in the darkness of the earth nor anything fresh or dry, but is written in a Clear Record