O'Reilly logo

Mac OS X Tiger in a Nutshell by Jason McIntosh, Chuck Toporek, Chris Stone, Andy Lester

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

GetFileInfo

Synopsis

GetFileInfo [options] pathname

Displays HFS+ file attributes (metadata) of file pathname. If you specify no options, GetFileInfo shows all the file's attributes. GetFileInfo is installed with the Xcode Tools (/Developer/Tools). Because this directory isn't in the shell's search path by default, you might to need to specify GetFileInfo's pathname to invoke it. See also SetFile .

Options

-a[attribute]

Display the settings for those attributes that toggle on or off (sometimes called "Finder flags "). If attribute is empty, the settings of all attributes are displayed as a series of letters. If the letter is shown in uppercase, that attribute is on (its bit is set). If the letter is shown in lowercase, that attribute is off. To view the setting for a single attribute (either 1 for on or 0 for off), specify that attribute by its letter in attribute. Refer to the following table for the specific attributes.

Table 2-3. Attributes for GetFileInfo's -a option

Attribute

Set | unset

Meaning

Alias

A | a

File is/isn't an alias.

Bundle

B | b

File has/hasn't bundle resource.

Custom Icon

C | c

File has/hasn't a custom icon.

Desktop Item

D | d

File is/isn't on the desktop.

Extension

E | e

Filename extension is/isn't hidden.

Inited

I | i

File is/isn't inited.

Locked

L | l

File is/isn't locked.

Shared

M | m

Multiple users can/can't run a file at once (applies to application files).

INIT

N | n

File has/hasn't INIT resource.

System ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required