How to hide files and folders

Discussion in 'Mac Apps and Mac App Store' started by Stormraven, Nov 5, 2010.

  1. Stormraven macrumors newbie

    Joined:
    May 5, 2010
    #1
    How can I hide certain files and folders on my iMac? Prefably without using a 3rd party application?

    Please help me =[
     
  2. LPZ macrumors 65816

    Joined:
    Jul 11, 2006
    #2
    Open Terminal (in Utilities). Enter the following, but don't press return yet. Leave a space after the "n".

    Code:
    chflags hidden 
    Now select all the files you want to hide and drag and drop them into the Terminal window. (This will append the file paths to the chflags command.)
    Then click on the Terminal window to make it active, and press return.

    (You can use "nohidden" instead of "hidden" to make files visible again.)
     
  3. Brian33 macrumors 6502a

    Joined:
    Apr 30, 2008
    Location:
    USA (Virginia)
    #3
    It depends on how computer-savvy the person you're hiding them from is. LPZ's post will hide them pretty well, but if other people with access to your Mac know how to use the "ls -a" command in Terminal, they'll still be able to see the files.

    Perhaps instead of hiding them you want to encrypt them? You can use Disk Utility (in /Applications/Utilities) to create an encrypted disk image (go to File->New->Blank Image). Then you can drag/drop files into it. Whenever you want to work with the files, you'll have to enter the password you've selected to mount the disk image, and you'll have to REMEMBER to unmount it when done. Name it something innocuous like "backups". Now, anyone will have to know the password to find out what's inside.
     
  4. LPZ macrumors 65816

    Joined:
    Jul 11, 2006
    #4
    Actually, just "ls" will show them, unless their names also begin with a period character.

    My suggestion simply "hides" the files from the GUI, eg. from Finder. I certainly didn't intend to suggest that this method of hiding is secure.
     
  5. guy86, Nov 5, 2010
    Last edited: Nov 5, 2010

    guy86 macrumors newbie

    Joined:
    Oct 3, 2010
    #5
    There are 3 methods that I know of.

    1. in Terminal: sudo chflags hidden [drag file, folder or volume - use 'unhidden' for reverse]
    2. if you have Xcode installed, you can use setfile application:
    [drag setfile app] -a V [drag file, folder or volume to be hidden - use small case 'v' for reverse]
    3. install supergetinfo. This one is easy, set the shortcut, use it on a folder or file and click on the 'invisible' box.

    Sometimes I have to go through all 3 before one of them works, especially with volumes, so there are a few quirks and it pays off to have them all handy. Not really securely hidden, of course, but if one doesn't have a reason to search for hidden files, one will not search for hidden files. I use it mainly to hide volumes like time machine and other storage/backup discs away from my desktop.
     

Share This Page