Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I am trying to find a way to make my mac see .dSYM files as hidden. I know I could do:

chflags hidden / -name *.dSYM

but the next time I create a .dSYM file it wont be hidden. There must be a way to tell finder to hide a certain file type (all currently on my machine, plus all that I will create in the future).

I am assuming that just because it is hidden, it wont affect my ability to use the .dSYM files when I am running cgdb in terminal? Or do the have to be not hidden for cgdb to be able to find them?

(I am on Mountain Lion)

share|improve this question
    
There isn't a direct way to do this. If the .dSYM files only occur in a few folders, Folder Actions might be an option. –  patrix Sep 9 '12 at 10:27
    
so you are suggesting to create a folder action that runs the bash code above everytime a file is added to one of my regular folders? do folder actions apply to subfolders of the folder that the action was applied to? –  Sam Sep 9 '12 at 10:58
    
AFAIK folder actions are only triggered in the respective folders –  patrix Sep 9 '12 at 12:39
    
So would it affect the operation of cgdb if the .dSYM files are hidden or should it still function OK? –  Sam Sep 10 '12 at 1:22
    
cgdb isn't impacted, chflags only works on Finder level (Finder itself and any Open/Save dialogs) –  patrix Sep 10 '12 at 3:22

1 Answer 1

AFAIK there isn't a direct way to do this. There are several alternatives though:

  • Folder Actions: Create a folder action (which gets triggered upon each change in a folder) to run the chflags command if needed. As Folder Actions only apply to to one folder this needs an Action for every folder you create .dSYM files in
  • launchd: Use WatchPaths to run a script whenever one of the listed paths is modified
  • Hazel: Hazel is kind of like Folder Actions on steroids and allows you to create actions based on various rules

PS: cgdb isn't affected, chflags only makes files invisible on Finder level (and in Open/Save dialogs).

share|improve this answer
    
i like the idea of using launchd with watchpaths. Is this very resource consuming? Or does it actually do nothing until it is triggered? Also, is there a way to make the watchpaths command recursive? –  Sam Sep 11 '12 at 12:33
    
It does "nothing" til triggered. The watchpath statement isn't recursive but you can list as many directories as you want. And you can use find the create the directory list in the first place. –  patrix Sep 11 '12 at 12:57
    
I am a student and have to make new directories a couple of times every week for each new task. So i need a way of automating this for subdirectories. Is it possible to set a folder action on a directory that has the task of setting a folder action on each new directory placed in it? –  Sam Sep 11 '12 at 22:20

Your Answer

 
discard

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.