Tuesday 17 April 2012

Argh, Want to get some file info on OSX ? Use GetFileInfo …. if you can find it :-)

Having an interesting conversation with Eric Mack about OSX folders and aliases in Notes, and wanted to check the file permissions for a file that isn't playing ball.

Everything I read on the 'net told me to use GetFileInfo - which is part of the OSX Developer Tools.

So I duly launched the Mac App Store, downloaded the Developer Tools ( all 1.5 GB of it ), and …

I still couldn't find GetFileInfo.

According to the documentation, it should be here: -

/usr/bin/GetFileInfo

but ….. it ain't.

After a quick search: -

$ find / | grep -i getfileinfo

I found it here …..

/Applications/Xcode.app/Contents/Developer/usr/bin/GetFileInfo

A quick symlink later: -

$ sudo ln -s /Applications/Xcode.app/Contents/Developer/usr/bin/GetFileInfo /usr/bin/GetFileInfo

and the job … she is done :-)



5 comments:

Unknown said...

what does it give you over the right click option?

Unknown said...

Good little hint :-) Also need to use GetFileInfo ... but Xcode is now around 2,5 gigs of download from Apple ... and JUST need this small executeable ... any possiblity that you could place only that one somewhere so we could grab it and place it in out usr/bin :-)

Dave Hay said...

@Brian - thanks for the feedback, I'm not going to share Apple's copyrighted code. If you need the code, I'd suggest that you contact Apple directly, cheers, Dave

Unknown said...

Fair enough :-) Was worth a shot though :-) Where would be the best place to make such a request to Apple you think...?

Dave Hay said...

@Brian, try Apple's developer forums here -> https://developer.apple.com/devforums/

Visual Studio Code - Wow 🙀

Why did I not know that I can merely hit [cmd] [p]  to bring up a search box allowing me to search my project e.g. a repo cloned from GitHub...