PDA

View Full Version : Problem creating CSV list of kexts in a folder.


lanceomni
01-16-2009, 08:28 PM
I am looking to build a spreadsheet with information on kext files. I want to include file name, file size in bytes, version & build.

I found the following code to give me filename, date, size in a CSV (Well actually they use a ; but it worked fine)
My problem is that since a kext is actually a folder the sizes listed do not reflect the contents. It displays the size of the folder empty.

ls -lT | \
awk '{print "\""$10"\""";""\""$6" "$7", "$9"\""";""\""$5"\""}' \
| pbcopy

Id like to get a list of the size including contents as I would get by right-clicking the kext and choosing Get Info.

I would also be interested in displaying the Version & Build numbers. I can use kextstat to display this information but only for those currently on my machine.

hayne
01-16-2009, 09:30 PM
Try the following command:

system_profiler SPExtensionsDataType

(It may take a minute or so to run)

lanceomni
01-17-2009, 07:45 AM
That is a useful command that I did not know. ;)

However it puts me in the same boat as kextstat in that it shows what is installed. I am trying to build a list from a folder of kexts.

I have all the major Apple update packages from 10.5 and have extracted the Extensions folder from each. I am building the database to show which version of which kext are in a particular update.