2

I have a strange and recurring problem on my recently upgraded Mac running macOS Catalina

First of all, Catalina has a new feature where you can Show/hide the hidden files on your machine using Cmd-Shift-Period. Press it once to show the hidden files press it again to hide them. AFAIK, this specific keystroke feature is new in Catalina (prior to Catalina, I always used the hack to set the finder defaults via the terminal to see my hidden files).

I normally keep my Finder windows showing the hidden files, because I want to see them.

Recently I noticed that all of my files on the desktop were greyed out-- like hidden. They were just random files I happened to have left on my desktop.

And what's strange is that they don't begin with a period (.), the way normal hidden files do. They seem to behave as hidden files even though they don't begin with a period.

If I press Cmd-Shift-Period, they disappear from view like all of the other hidden files. But unlike the other hidden files, they aren't supposed to be hidden.

enter image description here

If I press Cmd-Shift-Period again, they appear along with the other hidden files in my finder windows

enter image description here

Just to be clear: these files were NOT hidden yesterday, and I didn't do anything that I know of to cause this. And as noted below, it doesn't happen right away when I put new files on the desktop. I noticed it last week too but now it seems to have done it to even more files that I put on the desktop more recently than when I first noticed it (The same behavior-- Finder seems like it took some visible files and turned them into these invisible files without changing the file names or adding pre-pending periods like you'd expect for invisible files.)

1) I'm not sure what is causing this. What could be causing these files to appear in this hidden state and to have been normal files and then somehow get morphed into this hidden state?

2) How can i fix them? I've never seen hidden files like these-- I've only ever seen hidden files that begin with periods (so with this, you can add or remove the period to change its visibility)— if I do "Get Info" on these hidden files I can see the normal Get Info window, which has options for many things like "Hide extension" but no option to set the file to visibile/hidden.

Was this a new feature introduced in Catalina?

When I create new files on the desktop, the new files are not hidden and behave normally:

enter image description here

  • 1
    It seems that chflags has been used with -R flag. @Jason, try this: cd ~/Desktop ... chflags nohidden <some-hidden-file's-name-with-extension> ... killall Finder – anki Jun 3 at 15:32
  • hmm, it first tells me : Operation not permitted and if I use sudo then it seems to have no effect (I tried killall Finder and made sure the Finder re-opened the windows). In fact, when I use sudo it says Operation not permitted anyway. When finder relaunches, all my hidden files are hidden again, so I can only re-show them with Command-Shift-Period, but the chflags command seemed to have no effect on the file I specified (which I specified by exact path – Jason FB Jun 3 at 15:43
  • 1
    okay, could be different for Catalina. I'm on Mojave. Also, don't abuse sudo. Can you retry the commands after giving full disk access to terminal in system preferences > privacy & security ? – anki Jun 3 at 15:58
  • **** magic! *** once I granted "Full disk access" under system preferences > privacy & security to Terminal, I was then able to run chflags nohidden at my ~/Desktop (also, I noticed I was able to see auto-suggest from bash which I did not see before as well as run chflags nohidden . which fixed the entire directory en-masse) – Jason FB Jun 4 at 23:35
  • @ankii -- I'm not sure where the symptom comes from, but chflags nohidden is a good fix for this questions so if you want to leave a SE answer below I will accept it… – Jason FB Jun 4 at 23:36
1

We resolved it in the comments as following:

  • Give full disk access to Terminal in System Preferences > Privacy & Security.
  • Run

    cd ~/Desktop
    chflags -R nohidden ./
    killall Finder
    

    The -R flag will unhide recursively everything under the ./ (current directory).

  • To hide something back, for example:

    chflags hidden ~/Desktop/project/.git
    

    Don't use -R here since git only keeps the top level folder, .git hidden, rest all inside it is normal.

| improve this answer | |
  • :+1: :+1: :+1: :+1: – Jason FB Jun 6 at 16:17
  • @ankil-- I just witnessed the symptom re-occur, after a forced restart (my computer would not restart — it has a lot of what appears to be memory problems with Catalina even though I have 8 GB ram); Directly after a restart of the machine, I watched all of the files on the desktop simply disappear. I don't think this is come from my profile scripts. this is very strange. I am able to fix them again with the commands above but I still do not know where the symptom comes from – Jason FB Jun 6 at 23:01
  • Yikes, I spoke too soon… now they are gone again and now I can't fix them with the command above. – Jason FB Jun 6 at 23:03
  • this is definitely a Catalina bug … never saw anything like this before Catalina – Jason FB Jun 6 at 23:03
  • can someone please explains to me what "nohidden" actually is? I have used Unix file systems for over 25 years and have always known hidden files to begin with a .. These files appear hidden but do not begin with a period. Can someone please explain when this was introduced? Is this feature specific to MacOS? At first I was able to bring them back into visibility with the chflogs nohidden but now that no longer works… they just remain as-if they are hidden files. – Jason FB Jun 6 at 23:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .