Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I use SetFile via the terminal to render files and folders invisible inside Finder windows. This does not appear to work on symbolic links: the symlink destination is made invisible, rather than the symlink itself.

I see a number of symlinks in / which are invisible in the Finder (e.g. /etc -> private/etc), so it seems to be possible. Can I duplicate this behavior?

share|improve this question

To hide:

chflags -h hidden <symlink>

To show again:

chflags -h nohidden <symlink>
share|improve this answer
Note that the -h option was only added in Lion. I prefer using chflags, since SetFile only comes with Developer Tools. – Eric3 Apr 25 '13 at 15:31

Reading fail.

-P                                # perform action on symlink instead of following it

This flag has strange indenting in SetFile -h, and I must have just ignored it assuming it was related to the -m date flag.


SetFile -P -a V my_symlink
share|improve this answer
I got your flag, but it is okay to answer your own question if you find the answer yourself. Just be sure to check the other answers to make sure there isn't one better than your own. No worries. – Philip Regan Sep 6 '11 at 15:43

If you use ln -s source_file target_file from a terminal you'll get e.g. /etc -> private/etc shown in the ls -la - but only shown the target_file in the folder.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.