One of the Divine Attributes Allaah, The Most Exalted, Has is Infinite Knowledge that encompasses everything in the heavens and earth and what is in between them; in the worldly life and the Hereafter. Therefore, among His Divine Names is the All-Knowing. He, the Almighty Says in the Quarn (what means): "Verily, He, only He, is the All-Hearer, the All-Knower." [Quran 26: 220]
Allaah Almighty has called Himself by some other Names which reflect this attribute, such as Al-Khabeer (the All-Aware), which entails that He knows what will be before it happens; Al-Hakeem (the Wise), which entails that He knows the details of things; Ash-Shaheed (the Witness), which entails that He knows what is unseen and what is seen, i.e., that nothing is unknown to Him; and Al-Muhsiy (the Reckoner), which entails that the fact that He knows so much does not distract Him from knowing the tiniest details, such as the light of the day and how strong the wind is, and when the leaves fall. He knows the numbers and the movements of each leaf.
His Knowledge encompasses generalities and minor details:Some philosophers claim that Allaah knows things in general terms, but He does not know minor details. This, no doubt, is a sheer lie. The
Knowledge of Allaah, Glory is to Him, is comprehensive and all-encompassing, and nothing whatsoever is hidden from Him on earth or in the heavens. He knows every movement on land and in the depths of the sea, and there is no leaf that falls from a tree or a seed that is planted in the ground, or a small plant that cleaves the earth, or dries out or dies, but the Knowledge of Allaah encompasses it. Allaah Almighty Says (what means):
"...And He knows whatever there is in the land and in the sea; not a leaf falls, but He knows it. There is not a grain in the darkness of the earth, nor anything fresh or dry, but is written in a Clear Record." [Quran 6: 59]
Nothing of the innumerable animals, birds, insects, etc. is hidden from Allaah, as stated in the verse (which means):
"And no moving [living] creature is there on earth but its provision is due from Allaah. And He knows its dwelling place and its deposit [in the uterus or grave]. All is in a Clear Book [the Preserved Tablet]." [Quran 11: 6]
There is nothing that goes down into the earth, or ascends from the earth to the heavens, but Allaah encompasses it with His Infinite Knowledge. Allaah Says (what means):
"He knows that which goes into the earth and that which comes forth from it, and that which descends from the heaven and that which ascends to it. And He is the Most Merciful, the Oft-Forgiving." [Quran 34: 2]
Nothing of man is hidden from Allaah, the All-Knowing, whatsoever. Allaah’s Knowledge of man is comprehensive, encompassing his apparent and visible actions, but He also knows what is hidden in the depths of his soul, as stated in the verse (which means):
"Say [O Muhammad]: ‘Whether you hide what is in your breasts or reveal it, Allaah knows it...’" [Quran 3: 29]
And the verse (which means):
"And He is Allaah [to be worshipped Alone] in the heavens and on the earth; He Knows what you conceal and what you reveal..." [Quran 6: 3]
All the disasters and tribulations that happen on earth, or happen to the individual, or to his wealth or family, etc., were known to Allaah before they happened, He has written them in the Preserved Tablet as He Says (what means):
"No disaster strikes upon the earth or among yourselves except that it is in a register before We bring it into being — indeed that, for Allaah, is easy.” [Quran 57:22]
Allaah's Knowledge encompasses all the minor details of man’s life. He, the All-Knowing Says (what means):
"Neither you [O Muhammad] do any deed nor recite any portion of the Quran, nor you [O mankind] do any deed [good or evil], but We are Witness thereof, when you are doing it..." [Quran 10: 61]
In the Noble Quran, Almighty Allaah reports the invaluable advice which Luqmaan (a wise pious man) gave to his son in regards to pure faith in Allaah, the Most Exalted. This is in the verse (which means):
"O my son! If it be [anything] equal to the weight of a grain of mustard seed, and though it be in a rock, or in the heavens or in the earth, Allaah will bring it forth. Verily, Allaah is Subtle [in bringing out that grain], Well-Aware [of its place]." [Quran 3l: 16]
For the Knowledge of Allaah, secret and open, small and great, unseen and seen, are all the same, as in the verse (which means):
"Allaah knows what every female carries and what the wombs lose [prematurely] or exceed. And everything with Him is by due measure.[He is] (He is the) Knower of the unseen and the seen, the Grand, the Exalted. It is the same [to Him] concerning you whether one conceals [his] speech or one publicizes it and whether one is hidden by night or conspicuous [among others] by day." [Quran 13: 8-10]
Allaah, the Almighty, indeed spoke the truth when He said (what means):
"... And nothing is hidden from your Lord [so much as] the weight of an atom [or small ant] on the earth or in the heaven. Not what is less than that or what is greater than that but is [written] in a Clear Record." [Quran 10: 61]
Allaah's Knowledge: An excuse not to exert effort?Some might raise a question like: "If Allaah Knows or Decrees certain catastrophes or trials to happen, then why should I strive to avoid them?" Or, "If Allaah destined that a given person will live as a disbeliever and later is to be doomed to Hell, why should He punish him?"
The answer to such a misconception is that Allaah, the Most Exalted, has endowed man with ability, will and volition, and He has shown him the two ways: that of good and that of evil through His revelations to His Messengers may Allaah exalt their mention. So, whoever chooses the way of good, Allaah will guide him and grant him success and the opposite is true. Allaah Says (what means):
"And (We, i.e. Allaah) have shown him the two ways - of good and evil". [Quran 90:10].
Allaah also Says (what means):
"Whosoever desires (through his deeds) the reward of the Hereafter, We give him increase in his reward, and whosoever desires the reward of this world (through his deeds), We give him thereof (what is written for him), and he has no portion in the Hereafter." [Quran 42:20].
The above mentioned verses clarify that one has the volition and not obliged to do things against his will. For example, no one can deny that man has a volition concerning material affairs such as livelihood: he spares no effort to gain more and more although he knows that his livelihood is predestined.
Another example is that concerning one's seeking each and every remedy and means of safety to avoid harm.
http://www.islamweb.net/ver2/archive/article.php?lang=E&id=137164