Go Back   MacRumors Forums > Apple Systems and Services > OS X

Reply
 
Thread Tools Search this Thread Display Modes
Old Oct 14, 2007, 11:27 AM   #1
justinlt99
macrumors newbie
 
Join Date: Sep 2006
Location: Houston, TX
How to set files as Hidden/Unhidden

Okay, I know how to set OSX to let you view the hidden files on your hard drive. However, what I can not figure out is how to actually change these files to be "unhidden" once you have them viewable. Anyone know what to do?
justinlt99 is offline   0 Reply With Quote
Old Oct 14, 2007, 12:15 PM   #2
macjack1
macrumors regular
 
Join Date: Oct 2007
Location: The Big Apple
Launch Utilities/Termimal and enter:
Code:
defaults write com.apple.Finder AppleShowAllFiles YES
press enter

When you no longer want it visible, write:

Code:
defaults write com.apple.Finder AppleShowAllFiles NO
press enter

It is better to use an encrypted folder for this.

EDIT: Or are you referring to something like this topic support topic?

There is also this GUI,"Unhide Utility", which may be more to your liking. I have not used it myself so cannot recommend it.

-mj

-mj

Last edited by macjack1; Oct 14, 2007 at 12:28 PM.
macjack1 is offline   1 Reply With Quote
Old Oct 14, 2007, 12:41 PM   #3
justinlt99
Thread Starter
macrumors newbie
 
Join Date: Sep 2006
Location: Houston, TX
Quote:
Originally Posted by macjack1 View Post
Launch Utilities/Termimal and enter:
Code:
defaults write com.apple.Finder AppleShowAllFiles YES
press enter

When you no longer want it visible, write:

Code:
defaults write com.apple.Finder AppleShowAllFiles NO
press enter

It is better to use an encrypted folder for this.

EDIT: Or are you referring to something like this topic support topic?

There is also this GUI,"Unhide Utility", which may be more to your liking. I have not used it myself so cannot recommend it.

-mj

-mj
I'm not talking about making it visible --- I know how to do that. I mean to change the actual status of the file so that it is no longer physically a hidden/invisible file.
justinlt99 is offline   0 Reply With Quote
Old Oct 14, 2007, 02:13 PM   #4
macjack1
macrumors regular
 
Join Date: Oct 2007
Location: The Big Apple
Quote:
Originally Posted by justinlt99 View Post
I mean to change the actual status of the file so that it is no longer physically a hidden/invisible file.
I believe you can use Developer Tools for that if they are installed: /Developer/Tools/SetFile -a V /Users/~/filename

-mj
macjack1 is offline   0 Reply With Quote
Old Sep 4, 2010, 06:59 PM   #5
eah2119
macrumors regular
 
Join Date: Aug 2010
I used this command and I found my deleted files and where my Trash is actually located on my HD. In my home folder is a hidden file named ".Trash". I was curious, what happens if I delete the ".Trash" file and send it to the Trash? Is this possible? Will my system crash? What happens? lol I don't want to do it myself and possibly risk permanently deleting my Trash.
eah2119 is offline   0 Reply With Quote
Old Sep 4, 2010, 07:22 PM   #6
upaymeifixit
macrumors 6502a
 
upaymeifixit's Avatar
 
Join Date: Feb 2009
Quote:
Originally Posted by eah2119 View Post
I used this command and I found my deleted files and where my Trash is actually located on my HD. In my home folder is a hidden file named ".Trash". I was curious, what happens if I delete the ".Trash" file and send it to the Trash? Is this possible? Will my system crash? What happens? lol I don't want to do it myself and possibly risk permanently deleting my Trash.
I've done this before accidentally. I think I typed in: sudo rm ~/.Trash or something like that. I found out all it does is sends it to the /.Trashes folder that every volume has on it. That folder is then rebuilt when you log in (I restarted). Now I think I've deleted the /.Trashes folder before, but I don't really remember.

I have a question. What is -rf for? (Often seen in sudo rm -rf *dir*)
upaymeifixit is offline   0 Reply With Quote
Old Sep 4, 2010, 08:49 PM   #7
mac2x
macrumors 65816
 
Join Date: Sep 2009
Quote:
Originally Posted by macjack1 View Post
I believe you can use Developer Tools for that if they are installed: /Developer/Tools/SetFile -a V /Users/~/filename

-mj
?

All one needs to do is use Terminal to remove the "." that is in front of hidden files.

To use my bash_profile file (a commonly accessed hidden file for some) for example:

Code:
$ pwd
/Users/MyUsername
$ ls -a
.bash_profile
$ mv .bash_profile bash_profile
$ ls 
bash_profile
__________________
Retina MBP | 2.6 GHz i7 | 16 GB RAM

Gaming Rig | Core i7-2600K | 16 GB RAM | 160 GB OCZ Agility 2 | EVGA GTX 770 SC | Windows 7 Pro x64 | ASUS VG248QE
mac2x is offline   0 Reply With Quote
Old Sep 4, 2010, 09:12 PM   #8
angelwatt
Moderator emeritus
 
angelwatt's Avatar
 
Join Date: Aug 2005
Location: USA
Quote:
Originally Posted by mac2x View Post
All one needs to do is use Terminal to remove the "." that is in front of hidden files.
Some files/folders are hidden without them having a dot in front of their name, such as /var/. Also, when you already know the name of the file, you can directly access it anyways without renaming it, e.g., open -t .profile

Quote:
Originally Posted by upaymeifixit
I have a question. What is -rf for? (Often seen in sudo rm -rf *dir*)
The -r is for recursive, the -f for force (no confirmation). Type in "man rm" for more details.
angelwatt is offline   0 Reply With Quote
Old Jul 29, 2011, 07:10 AM   #9
MACaRHOni
macrumors newbie
 
Join Date: Jul 2011
Still unanswered...!

Quote:
Originally Posted by justinlt99 View Post
Okay, I know how to set OSX to let you view the hidden files on your hard drive. However, what I can not figure out is how to actually change these files to be "unhidden" once you have them viewable. Anyone know what to do?
This is a great question, and it hasn't been entirely answered. If you set a file to "hidden," how do you undo such an action?

Part Two of my question gets even trickier: On my old PC, I made a few photos hidden. (Let your minds wander.) When I transfered all my photos to my beautiful new MacBook, they remained hidden. If I use Terminal commands to view them, they become visible; however, they remain hidden files. So although I can see them as faded photo icons, they can not be "unhidden" like the rest of my photos. How do I fix this mess and set these PC-hidden photos to be completely visible at all times?

And please, everybody, understand that "hidden" is NOT the same as "invisible." My PC photos are hidden files that are invisible; Terminal commands make them visible; I want the file to be unhidden.

Thanks for the help, iFriends!
MACaRHOni is offline   0 Reply With Quote
Old Jul 29, 2011, 09:08 AM   #10
wrldwzrd89
macrumors G4
 
wrldwzrd89's Avatar
 
Join Date: Jun 2003
Location: Solon, OH
Terminal to the rescue again.
Code:
chflags hidden /path/to/file.ext
... will hide a file (no developer tools required)
Code:
chflags nohidden /path/to/file.ext
... will unhide a file (no developer tools required either).
__________________
iMac Intel (Rev H, 27"), 1TB HDD, 16GB RAM, 10.8.4
wrldwzrd89 is offline   0 Reply With Quote
Old Jul 30, 2011, 01:14 AM   #11
MACaRHOni
macrumors newbie
 
Join Date: Jul 2011
Can you be a bit more specific with what I need to plug into the equation, wrldwzrd89? I'm a bit dumb with computer language.

Let's say, for example, that the photo can be found in the folder called "July 2011", which is in the larger folder called "College," which is finally sorted under the main Mac folder called "Pictures." We'll say the file name is "Crazy Night Downtown 023."
MACaRHOni is offline   0 Reply With Quote
Old Jul 30, 2011, 01:35 AM   #12
upaymeifixit
macrumors 6502a
 
upaymeifixit's Avatar
 
Join Date: Feb 2009
Quote:
Originally Posted by MACaRHOni View Post
Can you be a bit more specific with what I need to plug into the equation, wrldwzrd89? I'm a bit dumb with computer language.

Let's say, for example, that the photo can be found in the folder called "July 2011", which is in the larger folder called "College," which is finally sorted under the main Mac folder called "Pictures." We'll say the file name is "Crazy Night Downtown 023."
chflags hidden ~/Pictures/College/July\ 2011/Crazy\ Night\ Downtown\ 023.jpg
upaymeifixit is offline   0 Reply With Quote
Old Jul 30, 2011, 06:08 AM   #13
wrldwzrd89
macrumors G4
 
wrldwzrd89's Avatar
 
Join Date: Jun 2003
Location: Solon, OH
Quote:
Originally Posted by upaymeifixit View Post
chflags hidden ~/Pictures/College/July\ 2011/Crazy\ Night\ Downtown\ 023.jpg
You can also just drag & drop the file onto the Terminal window, assuming you can see it in the Finder, after typing the chflags nohidden (or chflags hidden) part, then a space.
__________________
iMac Intel (Rev H, 27"), 1TB HDD, 16GB RAM, 10.8.4

Last edited by wrldwzrd89; Jul 30, 2011 at 06:09 AM. Reason: Delete stray emoticon and spelling fix
wrldwzrd89 is offline   1 Reply With Quote
Old Oct 7, 2014, 03:17 AM   #14
TwentyPeace
macrumors newbie
 
Join Date: Oct 2014
Quote:
Originally Posted by wrldwzrd89 View Post
You can also just drag & drop the file onto the Terminal window, assuming you can see it in the Finder, after typing the chflags nohidden (or chflags hidden) part, then a space.
You can drag and drop multiple files and folders. Terminal magic makes them Visible.
TwentyPeace is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > OS X

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Resolved: Hidden files spravtek OS X 10.8 Mountain Lion 9 May 1, 2014 06:18 PM
Help with hidden files netrogrant Mac Basics and Help 1 Mar 22, 2013 09:52 PM
Where are my files hidden? Missmouse3 iPad Tips, Help and Troubleshooting 1 Mar 6, 2013 01:07 PM
hidden files on my HDD are to stay hidden forever???help falconb Mac Basics and Help 11 Oct 11, 2012 03:30 PM
Show Hidden Files in ML slrandall OS X 10.8 Mountain Lion 2 Aug 1, 2012 10:23 PM

Forum Jump

All times are GMT -5. The time now is 10:10 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC