Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Hakkinen

macrumors member
Original poster
May 7, 2004
78
0
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?
 

HexMonkey

Administrator emeritus
Feb 5, 2004
2,240
504
New Zealand
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
 

Hakkinen

macrumors member
Original poster
May 7, 2004
78
0
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?
 

HexMonkey

Administrator emeritus
Feb 5, 2004
2,240
504
New Zealand
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).
 

~Shard~

macrumors P6
Jun 4, 2003
18,377
48
1123.6536.5321
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:
 

Hakkinen

macrumors member
Original poster
May 7, 2004
78
0
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.
 

Hakkinen

macrumors member
Original poster
May 7, 2004
78
0
HexMonkey said:
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

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. :)
 

~Shard~

macrumors P6
Jun 4, 2003
18,377
48
1123.6536.5321
Hakkinen said:
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.

I completely realize that buddy - was just having some fun and being a bastard - it's what I do! :cool:
 

Hakkinen

macrumors member
Original poster
May 7, 2004
78
0
~Shard~ said:
I completely realize that buddy - was just having some fun and being a bastard - it's what I do! :cool:

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... :)
 

janey

macrumors 603
Dec 20, 2002
5,316
0
sunny los angeles
~Shard~ said:
I love how obvious it is when people are trying to hide porn on their machines.
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
 

~Shard~

macrumors P6
Jun 4, 2003
18,377
48
1123.6536.5321
übergeek said:
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

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:
 

Hakkinen

macrumors member
Original poster
May 7, 2004
78
0
~Shard~ said:
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:

So what do you suggest übergeek to hide his jpg and mpg files then?
 

Espnetboy3

macrumors 6502
Feb 1, 2003
463
0
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.
 

Hakkinen

macrumors member
Original poster
May 7, 2004
78
0
Espnetboy3 said:
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.

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?
 

janey

macrumors 603
Dec 20, 2002
5,316
0
sunny los angeles
Hakkinen said:
So what do you suggest übergeek to hide his jpg and mpg files then?
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.
 

Hakkinen

macrumors member
Original poster
May 7, 2004
78
0
übergeek said:
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 ;)
OOPS! I should have checked both you and her profile. I learn my lesson.
:D
 

Hakkinen

macrumors member
Original poster
May 7, 2004
78
0
~Shard~ said:
"you" and "her"?!? Who's profiles are you referring to, apart from übergeek's? :confused:

What am i talking about....
:confused:
Yeah i know its Monday and you are in the office, but wake up Hakkinen!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.