Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

10.4: Use SetFile utlity without Developer Tools install UNIX
You may not have noticed, but a number of recent Apple updates (eg. at least the 10.4.5 through 10.4.7 updates) have included the SetFile utility in their installer packages, leaving a copy in /Library/Receipts.

To find what is available on your system, try either of these commands (the first may include some unrelated results, but it's faster, assuming you've created the locate database) in Terminal (found in /Applications -> Utilities):
$ locate SetFile | xargs ls -lut
$ find /Library/Receipts -name SetFile | xargs ls -lut
SetFile will be familiar to many users as the handy command line tool for making files and folders visible / invisible (if their visibility isn't already being determined by something else), changing their type or creator codes, setting file creation date, or other functions, as detailed in its man page

So for example, if you have a PowerPC Mac, and the 10.4.7 update was installed with the Delta (not Combo) installer, and you have a folder on your Desktop" called Inviso, it should be possible to hide that folder with this command:
$ /Library/Packages/MacOSXUpd10.4.7PPC.pkg/\
Contents/Resources/SetFile -a V ~/Desktop/Inviso
Quit and restart the Finder (don't Force Quit or Relaunch from the Dock), or log out and back in for the change to take effect. Repeating the procedure, substituting v for V will reverse the change.

Maybe this will let users without the Developer Tools get in on the various MacOSXHints that call for SetFile, or save someone suffering from the appearance of a previously-hidden folder or symbolic link the bandwidth of downloading the entire Developer Tools package (version 2.3 weighs in at 915MB) just to get access to SetFile, which itself is only 41KB for the Universal binary.
    •    
  • Currently 3.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (2 votes cast)
 
[29,336 views]  

10.4: Use SetFile utlity without Developer Tools install | 4 comments | Create New Account
Click here to return to the '10.4: Use SetFile utlity without Developer Tools install' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
setting up locate
Authored by: nvdingo on Aug 02, '06 08:37:20AM

for those of you who don't have `locate` setup, it's this easy
sudo /usr/libexec/locate.updatedb
put in your administrative password, and it will set about creating/updating your locate database.

the locate database does get updated automatically, but at midnight via a cron job.
so if you don't leave your computer on and awake at all hours, this can be mighty inconvenient.

I believe there is a tool out there that does this for you via a GUI, but i don't use it, so I am unsure of the name.

locate is a LOT faster than spotlight for find by name type searches, especially in hidden directories.



[ Reply to This | # ]
setting up locate
Authored by: BOlle on Aug 02, '06 01:16:02PM
The GUI tool is called Locator (sebastian-krauss.de)

[ Reply to This | # ]
setting up locate
Authored by: kalderon on Aug 02, '06 01:30:43PM
The GUI program you mention might be locator:

http://www.sebastian-krauss.de/software/

[ Reply to This | # ]
10.4: Use SetFile utlity without Developer Tools install
Authored by: Serpentine on Feb 02, '08 11:42:39PM

how do i rollback after using "sudo /usr/libexec/locate.updatedb"??



[ Reply to This | # ]