The Notebook Review forums were hosted by TechTarget, who shut down them down on January 31, 2022. This static read-only archive was pulled by NBR forum users between January 20 and January 31, 2022, in an effort to make sure that the valuable technical information that had been posted on the forums is preserved. For current discussions, many NBR forum users moved over to NotebookTalk.net after the shutdown.
Problems? See this thread at archive.org.

    Showing and Hiding files under Mac OS X

    Discussion in 'Apple and Mac OS X' started by toyota_scion_tc, Apr 5, 2011.

  1. toyota_scion_tc

    toyota_scion_tc Notebook Consultant

    Reputations:
    0
    Messages:
    196
    Likes Received:
    0
    Trophy Points:
    30
    How do you hide a file under OS X and how do you show hidden files under OS X? Is there a way without using terminal?
     
  2. SP Forsythe

    SP Forsythe Notebook Evangelist

    Reputations:
    173
    Messages:
    664
    Likes Received:
    0
    Trophy Points:
    30
    Using Terminal, you use the command:
    defaults write com.apple.Finder AppleShowAllFiles YES

    To change it back, re-enter the command, changing " YES" to " NO".

    Other than using terminal, you can use a program called OnyX. Within the main screen, under the parameters tab in the "finder" section, you check-mark "Show hidden files and folders".

    One has exercise a tad more care with OS X than Windows, when you enable showing hidden files and folders. Since OS X makes use of hidden files much more than Windows, insofar as there are some in every folder, it can be all too easy to delete an important file when selecting a group for deletion. At least that is what I have found. it's one of the minor peeves that I have with OS X. Even a thumb drive which is used but for transporting one file, will have a few hidden files placed upon it by mounting it in OS X. I wish you could toggle on and off the adding of spotlight and trash files on an external drive.
     
  3. SP Forsythe

    SP Forsythe Notebook Evangelist

    Reputations:
    173
    Messages:
    664
    Likes Received:
    0
    Trophy Points:
    30
    Here's another way that works, that does not involve terminal, or installing a space consuming multi-function program.

    Using Applescript Editor (within your utilities folder), paste the following script:

    Take the above AppleScript, open Script Editor, paste into window, and save as an application, leaving all check boxes unchecked. Double-click on the applet and it will toggle visibility of files, complete with quitting and relaunching the Finder.

    Put the app in your utilities folder, and it always be handy to toggle your show hidden files option.


    As far as making a single file invisible, I'll let someone else answer that one. I only know of a way using Terminal to create a hidden folder, to which you can then add files, making them, for all intents and purposes, invisible.

    edit: Altomac.com has a program called "Hide Folders", which seems an easy way to show/hide individual folders. I have not tried it though.
    edit 2: I just downloaded and tried the Altomac application. Using it, and the Applescript above would seem to do everything you want to do.
     
  4. doh123

    doh123 Without ME its just AWESO

    Reputations:
    996
    Messages:
    3,727
    Likes Received:
    1
    Trophy Points:
    106
    I'd just get the Secrets preferences pane.. you can do tons of stuff plus enabling view all files.

    Its kinda complicated to actually do a real hide on a file or folder, but you can do it a simple way just by using the unix method of renaming it starting with a . and it won't show up.
     
  5. SP Forsythe

    SP Forsythe Notebook Evangelist

    Reputations:
    173
    Messages:
    664
    Likes Received:
    0
    Trophy Points:
    30
    There's a simple way of doing that? Tell us. Finder certainly won't let you.

    And using Terminal for every single file is pretty far from the simplicity I think the OP was looking for.
     
  6. Chris27

    Chris27 Notebook Deity

    Reputations:
    421
    Messages:
    955
    Likes Received:
    0
    Trophy Points:
    30
    Open terminal
    cd to the directory of the file you want to make hidden (say myfile.txt)
    then the following command will make the file hidden

    mv myfile.txt .myfile.txt
     
  7. SP Forsythe

    SP Forsythe Notebook Evangelist

    Reputations:
    173
    Messages:
    664
    Likes Received:
    0
    Trophy Points:
    30
    An alternate "simple" way to hide a file or folder is to create an Automater app that renames files with a period preceding the file name, with a simple drag and drop. Then all you have to do is drag a file or folder to the application icon to hide it. No opening of terminal, and no text commands to type.

    To unhide it, use the Applescript app that I posted in my original response to toggle hide/show hidden files, then rename the now visible file without the period. Finder WILL let you do that part.

    If anyone is interested in the the app, I'll upload it and post the address.
     
  8. aznguyen316

    aznguyen316 Rock Chalk Jayhawk

    Reputations:
    317
    Messages:
    2,246
    Likes Received:
    3
    Trophy Points:
    56
  9. toyota_scion_tc

    toyota_scion_tc Notebook Consultant

    Reputations:
    0
    Messages:
    196
    Likes Received:
    0
    Trophy Points:
    30
    Thank you all for the help.