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

A workaround for the broken SetFile command UNIX
Xcode 1.2 has a broken version of SetFile, which is used to set various parameters for files. When you supply letters for the -a (attributes) option, SetFile runs without an error, but then no new settings are applied.

There's a weird workaround, though. To disable the attribute, use the uppercase letter (instead of lowercase, as it should be). To enable the attribute, write the lowercase letter of the attribute followed immediately by the uppercase letter of the same attribute.

Here's an example for Invisibility:

Enable: SetFile -a vV some_file
Disable: SetFile -a V some_file

[robg adds: Hopefully they'll fix this glitch in the next XCode update.]
    •    
  • Currently 1.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (1 vote cast)
 
[6,569 views]  

A workaround for the broken SetFile command | 6 comments | Create New Account
Click here to return to the 'A workaround for the broken SetFile command' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
A workaround for the broken SetFile command
Authored by: seb2 on Jul 26, '04 01:18:06PM

Thank you so much for that hint!
I had always wondered why SetFile had ceased to function as it used to under previous incarnations of OS X.



[ Reply to This | # ]
A workaround for the broken SetFile command
Authored by: hopthrisC on Jul 26, '04 01:56:25PM

Might be too simple, but what about using the binary from version 1.1?



[ Reply to This | # ]
A workaround for the broken SetFile command
Authored by: jdb8167 on Jul 26, '04 02:30:54PM

Classic case showing why Apple should release source to their command line tools. There is nothing proprietary here and they would be releasing to the community that could fix a little problem like this in 10 minutes.



[ Reply to This | # ]
A workaround for the broken SetFile command
Authored by: juggularity on Jul 27, '04 01:36:38AM

I wish I had known about the work around sooner. I reported the bug to Apple and it is supposed to be fixed in the latest XCode 1.5 seed update.



[ Reply to This | # ]
A workaround for the broken SetFile command
Authored by: DC Watts on Jul 27, '04 08:45:00AM

My thanks also, monkeycow! I was just about to try backdating /Developer/Tools/SetFile when I saw this hint. Now I can wait for the next Xcode update.



[ Reply to This | # ]
still not working for me...
Authored by: koelling on Nov 14, '04 08:53:20PM

This hint didn't work for me. I was trying to go backwards (I had goofed using OnMyCommand and made a bunch of files invisible). No combination of V and v worked for me, but if I copied the invisible files to another folder they reappeared.

mkdir ../tempfolder
cp * ../tempfolder
cd ..
rm -r realfoldername
mv tempfolder realfoldername

When you get desparate, there's the hack.



[ Reply to This | # ]