no hidden file?

Discussion in 'macOS' started by Jiggy1965, Dec 10, 2008.

  1. Jiggy1965 macrumors newbie

    Oct 7, 2008
    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?
  2. ppc750fx macrumors 65816

    Aug 20, 2008
    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.
  3. Moof1904 macrumors 65816

    May 20, 2004
  4. mnkeybsness macrumors 68030


    Jun 25, 2001
    Moneyapolis, Minnesota
    Open terminal application and type the following:

    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:

    mv .yourfile newfilename
    your file will now be titled "newfilename" and appear on the desktop
  5. Jiggy1965 thread starter macrumors newbie

    Oct 7, 2008
    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'?
  6. jmxp69 macrumors 6502

    Dec 10, 2008
    defaults write AppleShowAllFiles TRUE
    killall Finder

    Restore to default:
    defaults write 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.


Share This Page