How to hide file in OSX?

DataLife

Registered
How do you change visibility of a file temporarily? I've done this before way back on OS8 but can't remember how to go about it.

Thanks.
 
you can rename it with the terminal to something starting with a period, it wont show up in the finder anymore
 
If you are familiar with the terminal app, it is quite easy.

1. change directory to the one your file is in. (using the cd command)

2. type: mv file.extension .file.extension

eg) mv document.txt .document.txt

the . in front of the filename makes it invisible to the finder and the 'ls' command in the terminal

to change it back just do the same thing in reverse.

mv .document.txt document.txt
 
If you can't rename the file for any reason (Maybe a app needs this file named the way it is) just add the name to the .hidden file on your hdd root.

Using Terminal like:
cd /
pico .hidden
Save with CTRL+o and than CTRL+x

After this the Finder should hide all files named that way. Maybe Finder need to be restarted. Never tryed this here but should work.

But remember that they are just hidden in the Finder. Any person with some *nix knowledge could easily find them by using "find / -name xyz" or "ls -al" or even "locate xyz" if locate database is actual.
So it's just cosmetic. If you really wanne hide files so nobody can access or find them create a aes128 diskimage named what ever you like (mysecret.dmg ;) ) and move the files to that diskimage.
 
rbuenger said:
If you really wanne hide files so nobody can access or find them create a aes128 diskimage named what ever you like (mysecret.dmg ;) ) and move the files to that diskimage.

What is an aes128 diskimage ... and how does it work?
 
To make an AES-128 encrypted disk image, use the "Disk Copy" utility and choose to create a new image. There'll be an option there for Encryption, which you can set to AES-128. You'll then put in a password.
This creates a DMG file which, when you open it and enter the password, shows up on the desktop as a drive. Drop the files onto it, then eject the drive. Now nobody can get to those files without entering the password.
 
The Encrypted Disk image doesn't hide files as much as it moves them from your directory tree. If you are trying to hide something that you wouldn't want anyone casually browsing your mac to see, just use the /.hidden file or prefix it's name with a period.
For things like your secure documents - passwords, finances, important work documents - use an encrypted disk image or even an encrypted removable image.
 
Thanks ... symphonix and mr. k ... I will experiment. (I remember . files from the old days of msdos and even further back to cpm and mpm!) Of course it is only now (with OS X and Unix) that us Maccers can get to these things easily.
 
mr. k said:
The Encrypted Disk image doesn't hide files as much as it moves them from your directory tree. If you are trying to hide something that you wouldn't want anyone casually browsing your mac to see, just use the /.hidden file or prefix it's name with a period.

Hmm, I don't understand what you mean. If I just use a . or the .hidden file they are not moved out the directory tree. Everyone using the Terminal or any "Patch" to see "invisible" files see those files.

But when using a AES128 diskimage, moving the files on this image and the secure erasing the original they're truely invisible. Nobody without my password is able to see this files or even their name in any directory.

So . or .hidden is just an option if you wanne hide them from your stupid neighbour not more. If you have sensitive data in these files this wouldn't be a safe solution. Just would take me 2 seconds to list all hidden files on your complete harddrive.

Using an AES128 diskimage is secure because the file is completly encrypted. That you have to remove the original file should be clear to everyone. Secure erasing (srm in Terminal) is prefered.

And if you with you could hide this diskimage with a . if you don't want everyone to see it. But why hide a backup.dmg if nobody can't see what's in it?

And a diskimage is much more easy to use. Just mount it, enter you password and that's it. No need to rename or use the Terminal every time you want to access your files. And if you don't know it: BBEdit displays hidden files and pathes in the open dialog if you choose "Open hidden..." ;)
 
Back
Top