When the entire land of Egypt hungered: For their grain, which they had stored, had decayed, except that of Joseph. — [from Mid. Tanchuma Mikeitz 7]

ותרעב כל ארץ מצרים: שהרקיבה תבואתם שאצרו חוץ משל יוסף:

what he tells you, do: Since Joseph had ordered them to circumcise themselves, and when they came to Pharaoh and said, “This is what he said to us,” he (Pharaoh) said to them, “Why didn’t you gather grain? Didn’t he announce to you that years of famine were coming?” They replied, “We gathered much, but it rotted.” He (Pharaoh) replied,“If so, do whatever he tells you. He issued a decree upon the grain, and it rotted. What if he issues a decree upon us and we die?” - [from Mid. Tanchuma Mikeitz 7, Gen. Rabbah 91:5]

56Now the famine spread over all the face of the land, and Joseph opened all [the storehouses] in which there was [grain], and he sold [it] to the Egyptians, and the famine intensified in the land of Egypt.

Now the famine spread over all the face of the land: Heb. פְּנֵי הָאָרֶץ. Who are the face of the land? These are the rich. — [from Gen. Rabbah 91:5]

על כל פני הארץ: מי הם פני הארץ, אלו העשירים:

all [the storehouses] in which there was: As the Targum renders: in which there was grain.

את כל אשר בהם: כתרגומו די בהון עיבורא:

and he sold [it] to the Egyptians: Heb. וַיִשְׁבֹּר לְמִצְרַיִם. The word שֶׁבֶר is [sometimes] an expression of selling and [sometimes] an expression of buying. Here it is used as an expression of selling. [In the verse]“Return, buy (שִׁבְרוּ) us a little food” (Gen. 43:2), it is an expression of buying. Do not say that it applies only to grain, for also with wine and milk we find:“and go buy (שִׁבְרוּ) without money and without a price, wine and milk” (Isa. 55:1).

Jacob saw that there was grain being sold in Egypt: From where did he see it? Is it not true that he did not see it, only that he heard of it, as it is said: “Behold, I have heard, etc.” (verse 2) ? What then is the meaning of “saw” ? He saw with the divine “mirror” that he still had hope (שֶׂבֶר) in Egypt, but it was not a real prophecy to explicitly inform him that this was Joseph. — [from Gen. Rabbah 91:6]

Why do you appear satiated?“: Heb. לָמָה תִּתְרָאוּ. Why do you show yourselves before the sons of Ishmael and the sons of Esau as if you are satiated? For at that time they still had grain (Ta’anith 10b). (And it appears to me that it should be explained according to its simple meaning: לָמָה תִּתְרָאוּ -Why should everyone stare at you and wonder at you that you are not seeking food for yourselves before what you have in your hands is depleted.) From others I heard that it (תִּתְרָאוּ) is an expression of emaciation. [Thus:] Why should you become emaciated because of the famine? Similar to this is”And he who emaciates [others] (וּמַרְוֶה) -he too will become emaciated (יוֹרֶא)" (Prov. 11:25)

Go down there: Heb. רְדוּ. But he did not say,“Go (לְכוּ).” He alluded to the 210 years that they were enslaved in Egypt, according to the numerical value of רְדוּ. — [from Gen Rabbah 91:2, Tan. Mikeitz 8]

So Joseph’s…brothers went down: But Scripture did not write “the sons of Jacob.” This teaches that they regretted selling him and decided to behave toward him in a brotherly manner and to ransom him for whatever amount of money would be demanded of them. — [from Gen. Rabbah 91:6, Tan. Mikeitz 8]

ten: Why is this written? Is it not written, (verse 4)“But Joseph’s brother, Benjamin, Jacob did not send” ? [It is therefore obvious that they were only ten.] But [this is what it means:] concerning brotherhood, they were divided into ten, for neither the love they all had for him (Joseph) nor the hate they all had for him was equal, [hence, in the attitude of brotherhood, they were divided into ten.] As concerning buying grain, they all were of one accord (lit., one heart). - [from Gen. Rabbah 91:2]

among those who came: They hid themselves [in the crowd] so that they would not be recognized, because their father had commanded them not to all appear at one entrance, but for each to enter through his own entrance, so that the evil eye would have no power over them, for they were all handsome and strong [and thus would be envied]. — [from Tan. Mikeitz 8, Gen. Rabbah 91:6]

and prostrated themselves to him, with their faces to the ground: Heb. וַיִשְׁתַּחִווּ. They prostrated themselves to him on their faces, and so every [expression of] הִשְׁתַּחִוָאָה means spreading out hands and feet. — [from Shev. 16b]

7And Joseph saw his brothers, and he recognized them, but he made himself a stranger to them, and he spoke to them harshly, and he said to them, "Where do you come from?" And they said, "From the land of Canaan to purchase food."

but they did not recognize him: Because when he left them, he was not full-bearded, and now they found him full-bearded. The Aggadic Midrash states:“And Joseph recognized his brothers” -when they were delivered into his hands, he recognized that they were his brothers, and he had compassion on them. But they did not recognize him when he fell into their hands, to behave toward him with brotherhood. — [from Yeb. 88a, Keth. 27b, B.M. 39b, Gen. Rabbah 91:7, Targum Jonathan]

that he had dreamed about them: Heb. לָהֶם, lit., to them, [but here it means] about them (Targum Jonathan). He knew that they (his dreams) had been fulfilled, for they (his brothers) had prostrated themselves to him. — [from Zohar, vol. 1, p. 199b]

אשר חלם להם: עליהם, וידע שנתקיימו, שהרי השתחוו לו:

the nakedness of the land: Heb. עֶרְוַת הָאָרֶץ, the exposure of the land, from where it can be easily conquered, similar to“he exposed (הֶעֱרָה) her fountain” (Lev. 20:18), and like“naked and bare (וְעֶרְיָה)” (Ezek. 16:7), and likewise, every [expression of] עֶרְוָה in the Scriptures is an expression of exposure. Onkelos, [however,] rendered: בִּדְקָא דְּאַרְעָא, as equivalent to הַבָּיִת בֶּדֶק (II Kings 12:6),“ the weakness of the house,” but he was not precise in explaining it according to the language of the verse.

But you have come to see the nakedness of the land: For you have entered by way of the ten gates of the city. Why did you not enter [together] through one gate?- [from Gen. Rabbah 91:7; Tan. Buber, Mikeitz 17]

This is just what I have spoken: The thing that I have spoken, namely, that you are spies, is true and correct. This is according to its simple interpretation. Its midrashic interpretation is, however: He said to them, “And if you find him (Joseph), and they (his owners) demand a large ransom from you, will you ransom him?” “Yes,” they replied. He said to them, “And if they say that they will not return him for any money, what will you do?” They said, “For this we have come, to kill or be killed.” He said to them,“That is [exactly] what I said to you; you have come to slay the people of the city. I divine with my cup that two of you destroyed the large city of Shechem.” - [from Gen. Rabbah 91:7, Tan. Mikeitz 8]

whether truth is with you: Heb. הַאמֶת, if the truth is with you. The “hey” is vowelized with a“pattach,” which is equivalent to an expression of wonderment. — [from Targum Onkelos]. And if you do not bring him, [I swear] by Pharaoh’s life, that you are spies.