Imam al-Shafi'i (may Allah have mercy on him) said: "If someone asks: How was (this item) sold in the time of the Prophet (peace and blessings be upon him)? We will say: Allah knows best. However, the way in which we have found buyers and sellers dealing is that a small quantity of it is sold by measure and a large quantity is sold by weight, and the indication of the reports also agrees with the way in which we have found people dealing."
Sayyiduna Umar bin al-Khattab (may Allah be pleased with him) said: "As long as ghee is sold by awaq (ounces), I will not eat ghee."
And the awaq resemble being a (unit of) measure.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب البيوع / Q11125
Sayyiduna Abu Bakrah (may Allah be pleased with him) says: Bread and oil were brought to Sayyiduna Umar (may Allah be pleased with him), and he said: "O belly! As long as ghee is sold by the ounce, you will have to make do with bread and oil."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب البيوع / 11125