Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

On a Unix system (or more specifically on Mac OS X) is it possible to show hidden files in only some directories? For example as a developer I want to see the hidden files in my Ruby on Rails projects but not on my desktop as well.

I guess I'm just tired of seeing all these .DS_Store and .trashes files swimming around, any remedies not directly related are welcome too!

share|improve this question
add comment

4 Answers

up vote 1 down vote accepted

Opening your project directory with a text editor such as TextMate (Great for RoR!), shows you all the files.

If not, it may be useful to add ".*|" at the beginning of the file pattern you will find in TextMate's Preferences > Advanced > File Pattern:

P.S. I'm not aware of any way to show invisible files only for a given directory. But i would rather not do it if it is possible. I prefer working with the terminal for this sort of things. It's even cooler with TextMate's Command line tool, type:

$ mate any_file_or_directory

...to open it in TextMate

share|improve this answer
add comment

Undirectly related solutions welcome?

Well, I recently came across this tutorial which allows you to use the Shift-Cmd-Period shortcut that's already usable in open/save dialog boxes inside Finder as well. It does involve restarting Finder, but since all the windows are all restored it's relatively seamless.

Quite stupid that Finder doesn't have such functionality built in if the open/save dialogs do have such functionality, but ah well.

share|improve this answer
add comment

you can write a shell script, eg with bash

shopt -s dotglob
for file in my_rails_directory1/.*  my_rails_directory2/.*
do
 echo $file
done 
share|improve this answer
    
dotglob is pointless when you manually use .* –  grawity Mar 19 '10 at 15:38
    
i leave it there in case OP want to list all files, not only hidden –  user31894 Mar 19 '10 at 15:44
add comment

Does not do precisely what you want, but I use the hiddenfiles widget to toggle visibility. This affects all folders off course, but it's quick to use.

share|improve this answer
add comment

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.