Rashi on the Former Prophets
Joshua 6
Shut and barred. [Lit. closed and closed] Targum translates: ‘Closed with iron gates and reinforced with bars of copper.’
Rams’ horns the horns of rams.
A long blast. When the final blast is sounded, and the blower extends the sound.
In its very place [Lit. under itself] In its place.
And the warriors. These were the men of the tribes of Reuvein and Gad who went before them, because the men of Gad were mighty warriors and they would smite with a strong arm, as it is said, ‘And he rips off the shoulder and the head.’
The rearmost. This refers to the tribe of Dan that traveled last and gathered all those who lagged behind.
On the seventh day. This was on the Shabbos.
And the city shall be consecrated. It shall be sacred, for that day was the holy Shabbos, maintains that Yehoshua issued this edict by Divine ordination, but also mentions that the Sages were of the opinon that Yehoshua issued this edict on his own. and it was therefore fitting that all the booty that was taken be holy.
And bring disturbance. This is an expression of disturbed waters.
And the lads who were the spies went in. This mission required speed, thus they performed like speedy lads. However on the first night they were like angels, guarding themselves from sinning with Rochov, the harlot, therefore they were referred to as angels. Therefore they were referred to as men, as angels and as lads.
[The death of] his first born etc. [the death of] his youngest son etc. When he begins laying the foundation upon which he is building it [the city], his first born son will die and he will bury him, and he will continue doing so until the youngest son dies at the completion of the work which is the setting of its portals.
You arrive at the cited line; the whole work is yours to read around it. The text is set from the cited public-domain edition.