That the Pentateuch was written by Moses, is the voice of all antiquity. It has been all along, even to this day, the received opinion of both Jews and Christians, that Moses, being commanded and inspired by God, wrote those books, which are called the Pentateuch, except only some particular passages, which were inserted afterwards by a divine direction, for the better understanding of the history.
We read, Exodus xxiv. 4, 7, 8. that Moses wrote all the words of the Lord, which before that time had been delivered from mount Sinai, in a book, which is there called The Book of the Covenant. Afterwards, when God had added more precepts, he again commands Moses to write them, Exod. xxxiv. 27. “And the Lord said unto Moses, Write thou these words; for after the tenor of these words have I made a covenant with thee and with Israel.” Near 40 years afterwards, Moses was commanded to write all the commands which God had given the people, and the revelations which he had made of himself to them, in a book, to be laid up by the side of the ark of the covenant, to be kept for a testimony against Israel. Deut. xxxi. 24-26. “And it came to pass, when Moses had made an end of writing the words of this law in a book, until they were finished, that Moses commanded the Levites, which bare the ark of the covenant of the Lord, saying, Take this book of the law, and put it in the side of the ark of the covenant of the Lord your God, that it may be there for a witness against thee.” And the original of this book of the law was in being, as we read expressly, till the times of Josiah; 2 Kings xxii. and 2 Chron. xxxiv. and so, doubtless, till the captivity into Babylon.