How to hide files

Discussion in 'Mac Apps and Mac App Store' started by Hakkinen, May 29, 2004.

  1. Hakkinen macrumors member

    Joined:
    May 7, 2004
    #1
    In Windows XP, there is an option to make the files hidden. you won't see the files unless you select 'show all files' and unless you know which folder the files are.
    But is there such option in Mac OS too?
     
  2. HexMonkey Administrator

    HexMonkey

    Staff Member

    Joined:
    Feb 5, 2004
    Location:
    New Zealand
    #2
    AFAIK you can't do this in Finder, but you can using the Terminal. Open Applications/Utilities/Terminal, and then type in the following:

    Code:
    cd [directory location]
    mv -i [filename] .[filename]
    Eg if you had a file located at /Folder/File.txt, you would type:

    Code:
    cd /Folder
    mv -i File.txt .File.txt
    The cd command sets "Folder" to the current directory, and the mv command renames the file. It simply puts a "." at the start of the filename, which makes it invisible in Mac OS X. Making files visible is almost the same:

    Code:
    cd [directory location]
    mv -i .[filename] [filename]
    eg

    Code:
    cd /Folder
    mv -i .File.txt File.txt
    This removes the "." from the start of the filename.

    A few things to note though: Firstly, if a folder or file name has a character such as a space in it, you must type a "\" before that character. Eg you'd type in "Picture\ 2.pdf" instead of "Picture 2.pdf". Secondly, you can make things easier by dragging files/folders on to the Terminal window, which will automatically enter the file/folder location for you (eg type "cd ", and then drag a folder on to the Terminal window). You can also use the tab key to automatically complete file/folder names.

    There is also a hidden option in Finder that lets of see all hidden files. To turn it on type:

    Code:
    defaults write com.apple.finder AppleShowAllFiles 1
    For the change to take effect, you need to relaunch Finder. You can do this in the Terminal by typing "killall Finder", or alternatively by relaunching Finder in the force quit dialog.

    To turn the option off type the following before relaunching Finder:

    Code:
    defaults write com.apple.finder AppleShowAllFiles 0
     
  3. Hakkinen thread starter macrumors member

    Joined:
    May 7, 2004
    #3
    Thanks HexMonkey, let me try this out tonight.
     
  4. Hakkinen thread starter macrumors member

    Joined:
    May 7, 2004
    #4
    One thing i forget to ask, for eg. if i hide a text file in terminal, even if i know the name and location of the file, but there is absolutely no way i can open this file unless i go to terminal and make it visible again right?

    Assuming i forget the name of this file, will i be able to locate it again in terminal?
     
  5. HexMonkey Administrator

    HexMonkey

    Staff Member

    Joined:
    Feb 5, 2004
    Location:
    New Zealand
    #5
    When you do a search in Finder you can specify for it to search invisible files, as well as other criteria. Then in the results window, you can double click files, or control/right click them to open with a chosen application.

    In Terminal, you can use the "-a" flag of the ls command to see invisible files. Eg type "cd /Applications" to go to your Applications folder, then "ls -a" to view a list of all files (visible and invisible). You can open the files with the open command, eg "open /Folder/File.txt"

    Or you can turn on the option in Finder to display invisible files (see my last message).
     
  6. parenthesis macrumors member

    Joined:
    Mar 22, 2003
    Location:
    Here and there
    #6
    Secret Folder

    Or you can use Apimac's Secret Folder
    which seems to be a more secure solution.
     
  7. rt_brained macrumors 6502a

    Joined:
    Jan 13, 2002
    Location:
    Creativille
    #7
    Just go to the Finder and select File>Hide>Porn
     
  8. realityisterror macrumors 65816

    realityisterror

    Joined:
    Aug 30, 2003
    Location:
    Snellville, GA
    #8
    :confused: i can't find it!! :confused:

    dang, that would come in handy... ;)

    reality
     
  9. ~Shard~ macrumors P6

    ~Shard~

    Joined:
    Jun 4, 2003
    Location:
    1123.6536.5321
    #9
    I love how obvious it is when people are trying to hide porn on their machines. They're the same type of people who innocently ask how to rip off copy protection from DVDs, CDs, etc. because "they only want to make a legitimate back-up copy of a disc they legally purchased". :cool:
     
  10. Hakkinen thread starter macrumors member

    Joined:
    May 7, 2004
    #10
    When you work in an environment with a lot of people nearby, you will find the need for hidding files such as password files, personal account and tax files, and even project files.

    There isn't much need to hide porn anyway. It is perfectly normal and I bet almost every single machine out there has some sort of porn materials. Be it picture or movie. Hey, may be even sexy photo of you and your gf is for your eyes only! :p
    Hope the moderator doesn't punish me for saying this.
     
  11. Hakkinen thread starter macrumors member

    Joined:
    May 7, 2004
    #11
    I tested this command in Terminal. Like you said, it shows all hidden files. That explains why my desktop suddenly has my user folder, Network, .Ds_store and .localized

    I entered 'defaults write com.apple.finder AppleShowAllFiles 0, it merely hide the invisible files again, but I can still do a search in Finder for invisible files.
    Is there option in the Finder to turn off the option to display or search invisible files?

    I am getting to like Mac OS in certain ways, because you need to know how to use the terminal and the commands to activate certain features. :)
     
  12. ~Shard~ macrumors P6

    ~Shard~

    Joined:
    Jun 4, 2003
    Location:
    1123.6536.5321
    #12
    I completely realize that buddy - was just having some fun and being a bastard - it's what I do! :cool:
     
  13. Hakkinen thread starter macrumors member

    Joined:
    May 7, 2004
    #13
    Me too! Have been having a lot of Why, What happen to my, How to....ever since I switch. Too much frustrations make me want to go off topic... :)
     
  14. musicpyrite macrumors 68000

    musicpyrite

    Joined:
    Jan 6, 2004
    Location:
    Cape Cod
    #14
    To hide my files I use FolderGuard, it even password protects my files. BTW, I don't hide porn on my computer, I hide improtant 'documents.' :D
     
  15. ~Shard~ macrumors P6

    ~Shard~

    Joined:
    Jun 4, 2003
    Location:
    1123.6536.5321
    #15
    Documents containing your links and passwords to porn sites? ;) :p
     
  16. janey macrumors 603

    janey

    Joined:
    Dec 20, 2002
    Location:
    sunny los angeles
    #16
    hehe hiding porn...mine is on an encrypted disk image hidden among a bunch of innocent looking files in a folder on a USB keychain thingie :)
    Otherwise I'm sure you could hide it in some place like /System/Library/TextEncodings or something...what are the odds someone would actually look :x
     
  17. ~Shard~ macrumors P6

    ~Shard~

    Joined:
    Jun 4, 2003
    Location:
    1123.6536.5321
    #17
    Ah, but what if someone does a system search for *.jpg or *.mpg or the like? They would still come up in the search and look quite suspicious! ;) :cool:
     
  18. Hakkinen thread starter macrumors member

    Joined:
    May 7, 2004
    #18
    So what do you suggest übergeek to hide his jpg and mpg files then?
     
  19. Espnetboy3 macrumors 6502

    Joined:
    Feb 1, 2003
    #19
    i just find making a disk image encrypted folder with a password works best. U can choose how much space u want the folder to take up for mpgs u can put like 500mb or something or pics u can put like 2mb . Works great and u cant mount it without the password.
     
  20. Hakkinen thread starter macrumors member

    Joined:
    May 7, 2004
    #20
    Sorry for asking. How to do that.
    But ok, lets say I have done that, but like ~Shard~ mentioned, other persons can still do a search and locate the files right?
     
  21. janey macrumors 603

    janey

    Joined:
    Dec 20, 2002
    Location:
    sunny los angeles
    #21
    her jpg and mpg files, i was not born a guy, although i am bi :)
    and if you think that the pic on my profile makes me look like a guy, i'm in deep deep trouble ;)

    With encrypted disk images, you need a password to mount it, but once its mounted, its fully searchable and behaves like an ordinary disk image, except for the fact that you need a password to mount it in the first place...
    unmounted, it is virtually unopenable without the password (or rather, passphrase) and nobody will know what's in there :)
    That's why you could always make the disk image like 4gb and call it like "FC2-i386-DVD.iso" (fedora core 2 install dvd image ;) ) to make people think its not porn, but instead its a linux install disk image. Major fun :) Mind you, if you do that, the file will basically be called FC2-i386-DVD.iso.dmg, but you could always make Finder not show file extensions. So it has the .dmg, but appears to be a .iso.
     
  22. Hakkinen thread starter macrumors member

    Joined:
    May 7, 2004
    #22
    OOPS! I should have checked both you and her profile. I learn my lesson.
    :D
     
  23. ~Shard~ macrumors P6

    ~Shard~

    Joined:
    Jun 4, 2003
    Location:
    1123.6536.5321
    #23
    "you" and "her"?!? Who's profiles are you referring to, apart from übergeek's? :confused:
     
  24. Hakkinen thread starter macrumors member

    Joined:
    May 7, 2004
    #24
    What am i talking about....
    :confused:
    Yeah i know its Monday and you are in the office, but wake up Hakkinen!
     
  25. janey macrumors 603

    janey

    Joined:
    Dec 20, 2002
    Location:
    sunny los angeles
    #25
    shard, i've only seen you on these forums since yesterday night, and already i love your posts :)
     

Share This Page