It is well known that Sayyiduna ‘Ali (RA) had a script of Ahadith with him. He says,
“I have not written anything from the Holy Prophet (SAWS) except the Holy Quran and what is contained in this script (Bukhari).
Imam Bukhari has mentioned this script at six different places of his Sahih. A combined study of all those places reveals that this script was substantially large and it consisted of Ahadith about Qisas (retaliation), Diyah (blood money), Fidyah(ransom) rights of the non-muslim citizens of an Islamic state, some specific kinds of inheritance, Zakah rules pertaining to camels of different ages, and some rules about the sanctity of the city of Madinah
The script was written by Sayyiduna Ali (RA) in the days of the Holy Prophet (SAWS). Then, in the days of his khilafah (rule), he felt that the Ahadith of the Holy Prophet (SAWS) should be spread among the people to widen the range of Islamic knowledge and to refute certain misguided ideas prevalent in those days.
It is reported by the famous historian lbn Saad that he stood in the mosque and delivered a lecture. Then he asked the people,
“Who will purchase ‘knowledge’ for one Dirham only?”
He meant that whoever wanted to learn Ahadith, should buy writing paper for one dirham and come to him, for dictation of the ahadith of the Holy Prophet (SAWS).
It is reported that Harith al A‘war bought some paper and came to him:
“So, Ali wrote for him a lot of knowledge” (Ibn Saad)
It should be kept in mind that the word ‘knowledge’ in the early centuries of Islamic history was used for the knowledge of Ahadith only (Ibn Saad).