Skip to Content
Mac OS X in a Nutshell
book

Mac OS X in a Nutshell

by Jason McIntosh, Chuck Toporek, Chris Stone
January 2003
Intermediate to advanced
832 pages
32h 40m
English
O'Reilly Media, Inc.
Content preview from Mac OS X in a Nutshell

Name

SetFile

Synopsis

SetFile [options] files
                  

Sets the HFS+ file attributes (metadata) of files. SetFile is installed with the Developer Tools into /Developer/Tools. Since this directory isn’t in the shell’s search path by default, you might to need to specify SetFile’s pathname to invoke it. See also GetFileInfo.

Options

-a attribute

Set those file attributes that toggle on or off (sometimes called “Finder flags”). To set an attribute, provide that attribute’s letter as uppercase in attribute. To unset an attribute, provide the letter in lowercase. You can specify multiple attributes at once; any not specified will retain their current setting in files. Refer to this table for the specific attributes:

Attribute

Set | Unset

Meaning

Alias

A | a

File is/isn’t an alias.

Bundle

B | b

File has/hasn’t a 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 file at once (applies to application files).

INIT

N | n

File has/hasn’t INIT resource.

System

S | s

File is/isn’t a system file (locks name).

Stationary

T | t

File is/isn’t a stationary file.

Invisible

V | v

File is/isn’t invisible to Finder.

-c creator

Set the file’s four-character creator code to creator.

-d date

Set the file’s creation date to date. Specify date in this ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Running Mac OS X Tiger

Running Mac OS X Tiger

Jason Deraleau, James Duncan Davidson
Troubleshooting CentOS

Troubleshooting CentOS

Jonathan Hobson

Publisher Resources

ISBN: 0596003706Catalog PageErrata