Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

topceres

macrumors newbie
Original poster
Sep 23, 2014
2
0
Dear all

For a terminal project/script I need the features of getting the file creator from the files on a mac. The executeable that comes with Xcode (free) "GetFileInfo" will do that as I have understood. However, I need only that and not the rest of Xcode (2,5GB download) - and I'm presently on a very limited 3G connection. Does anyone know ... would it in any way be possible to get/download only the GetFileInfo executeable (can anyone grab it from their installation and put it somewhere for me :) )? OR would there be any other way to do this from Terminal without installing GetFileInfo?

Thanks in advance
 
mdls command will read the file's metadata, but the output is a bit messier to read than GetFileInfo. mils is built into OS X it's available in terminal .

Here's a link: http://www.macissues.com/2014/05/12/how-to-look-up-file-metadata-in-os-x/

The key that equates to GetFileInfo Creator code is: kMDItemFSCreatorCode

To get just the creator code use:
mdls -name kMDItemFSCreatorCode <filename>
to see the usage for the command just use:
mdls
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.