Mac OS X Server: Hiding Stuff

Keeping a log of everything done to a machine is kind of important. I often will keep a duplicate of said log on the machine itself. Problem is, people keep deleting them. So, maybe we’ll just hide ‘em. What makes that nice and easy is the fact that Server comes with SetFile installed in the /System/Library/ServerSetup directory. For general OS X stuff you’ll just need to go grab it off the Developer Tools. Let’s go ahead and touch a file to the desktop called MyLog.txt:
touch /Users/cedge/Desktop/MyLog.txt

Now let’s mark it as invisible using the following:
./SetFile -a V /Users/cedge/Desktop/MyLog.txt

Other attributes that can be used with -a:
A Alias file
B Bundle
C Custom icon
D Desktop
E Hidden extension
I Inited
M Shared (can run multiple times)
N No INIT resources
L Locked
S System (name locked)
T Stationary
V Invisible

One comment

  • Pingback: Mac OS X: SetFile |

  • Comments are closed.