ANSWER: Jesus, many times, made a general reference to those who wrote the Bible when he stated "it is written" (Matthew 11:10, 21:13, 26:24, 26:31, etc.). In fact, in the KJV translation of the Bible, this phrase is record no less than twenty times. His quotation of Deuteronomy 8:3, during the time when he was tempted forty days by the devil, confirms the validity of the Old Testament and who wrote it (Matthew 4:4).
Concerning those who wrote the various books of the Bible, it is widely known that Moses penned the Torah. What is considered the Torah, or Law, consists of five books (Genesis, Exodus, Leviticus, Numbers and Deuteronomy) written during the forty year span when the Israelites wandered in the desert. Moses, after his writing was completed, had the Levitical priests place them inside the Ark of the Covenant for future reference (Deuteronomy 31:24 - 26, see also Exodus 24:4).
According to Jewish tradition, either Joshua or Ezra inserted, at the end of Deuteronomy, the account of Moses death. The Bible book named Joshua bears his name because he wrote it. He continued where Moses' portion ended in the Book of the Law (Joshua 24:26). The book of Judges is generally attributed to Samuel, but it is a little unclear exactly when he authored it.
It is believed that the prophet Isaiah wrote the books of 1 and 2 Samuel, 1 Kings, the first part of 2 Kings, and the book that bears his name. Some sources, like the Pelubert Bible Dictionary, states that a variety of people penned these books, such as Samuel himself (1Samuel 10:25), Nathan the prophet and Gad the seer. The books of first and second Chronicles are traditionally attributed, by the Jews, to Ezra, as well as the the section that bears his name. It should be noted that some modern scholars believe these books to be written by someone else after the death of Ezra.
The books named after Job, Ruth, Esther, the three major prophets (Isaiah, Ezekiel and Jeremiah), the ten minor prophets (Amos, Habakkuk, Haggai, Hosea, Joel, Jonah, Malachi, Micah, Nahum, Obadiah, Zechariah, and Zephaniah), along with Nehemiah and Daniel, were each written by the person after which the section is named. Although King David authored most of the Psalms, the priests who served while he was king, as well as Solomon and even Jeremiah, each contributed to this section. The book of Proverbs was primarily penned by Solomon, who also composed Ecclesiastes and the Songs of Solomon.
How long did it take to write the Old Testament, from the time of the first book to the authoring of its final chapter? The first Old Testament book recorded, in time sequence, was NOT by Moses but by Job! Job wrote his book around the 1660s B.C., more than two hundred years before Moses began to write. Malachi authored the last book included as part of the canonized Old Testament around 400 B.C. This means it took roughly more than 1,200 years to write the only Bible available to the New Testament church.
For the New Testament books of the Bible, two of the gospels were authored by men who were Jesus' first disciples (Matthew and John) and two who were not (Mark and Luke). Acts was written by Luke. The apostle Paul wrote fourteen books or epistles, such as Romans, Galatians, Ephesians, Hebrews and so on, two books each sent to the church at Corinth, the church at Thessalonica, and to his closes friend Timothy. The remaining first century books were penned by Peter (2), John (4) and one of Jesus' physical brothers named Jude.