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

Jiggy1965

macrumors newbie
Original poster
Oct 7, 2008
29
0
I've dragged an email attachment to my desktop. Its name began with a dot so Mac sees it as a 'hidden file' and the icon can't be seen on the desktop. So I did a search with the 'kind' option set to 'visibility: invisible'. But it doesn't show any hidden files. No file that starts with a dot.
Terminal does show it when I use ls -a.

So why doesn't it show when I do a 'hidden file' search?
 
Ah... and just like that we run into one of the few fun remaining hold-overs from the classic era...

There are actually two ways to hide a file in OS X. The first is the (more-or-less) standard *nix way, by starting the file name with a ".".

The second is the way that Mac OS used to do it, by setting a special flag in the file's metadata, specifically the invisible bit. Mac OS X supports this (and still uses it, at least to some extent). This is what your search query was including.
 
Open terminal application and type the following:

Code:
cd ~/Desktop
ls -lA

You will now see a verbose list of all items on your desktop. Locate the file you want that starts with a . For this purpose, I'll dub it ".yourfile". Back in Terminal:

Code:
mv .yourfile newfilename

your file will now be titled "newfilename" and appear on the desktop
 
I've located it by doing it the terminal way and removed the dot so it became visible again.

But I'm still curious why a ctrl-F search didn't find the file. I've set 'search' to look voor invisible files by setting the 'Kind' options. And the file is appearently made hidden by placing a dot in front of the file name. So the specific search query should find it? Or should I set the ctrl-F search to something else to search for hidden 'dot-files'?
 
defaults write com.apple.finder AppleShowAllFiles TRUE
killall Finder

Restore to default:
defaults write com.apple.finder AppleShowAllFiles FALSE
killall Finder

That will show your files. I don't know why ctrl-f doesn't see them. Doesn't see them on mine with AllFiles enabled either.

J
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.