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?
-
toyota_scion_tc Notebook Consultant
-
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. -
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:
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. -
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. -
And using Terminal for every single file is pretty far from the simplicity I think the OP was looking for. -
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 -
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. -
there's a houdini app that I used... I think it hid files as well as showed. Kind of like it's own finder.
http://mac.softpedia.com/get/Utilities/Houdini.shtml -
toyota_scion_tc Notebook Consultant
Thank you all for the help.
Showing and Hiding files under Mac OS X
Discussion in 'Apple and Mac OS X' started by toyota_scion_tc, Apr 5, 2011.