unhide files in Sonoma

I upgraded to Sonoma and now I have hidden files. How do I unhide all these files permanently?

iMac 27″, macOS 11.7

Posted on Oct 3, 2023 7:42 AM

Reply
Question marked as Top-ranking reply

Posted on Oct 3, 2023 11:59 AM

I had the same issue when upgrading to Sonoma. Called Apple support and they couldn't find out what caused this.


The command below fixed my problem and I'm able to download any files without them being 'invisible'. In fact I had some much older files re-appear on my desktop that were apparently hidden.


Open terminal (in the utilities folder under application folder) and type:

defaults write com.apple.finder AppleShowAllFiles true


After running the command, restart Finder by typing:

killall Finder


This will make hidden files and folders visible in Finder. To hide them again, type the same command in the first line, but use 'false' instead of 'true'.

14 replies
Question marked as Top-ranking reply

Oct 3, 2023 11:59 AM in response to ndunn433

I had the same issue when upgrading to Sonoma. Called Apple support and they couldn't find out what caused this.


The command below fixed my problem and I'm able to download any files without them being 'invisible'. In fact I had some much older files re-appear on my desktop that were apparently hidden.


Open terminal (in the utilities folder under application folder) and type:

defaults write com.apple.finder AppleShowAllFiles true


After running the command, restart Finder by typing:

killall Finder


This will make hidden files and folders visible in Finder. To hide them again, type the same command in the first line, but use 'false' instead of 'true'.

Jan 21, 2024 6:06 AM in response to Ned Schwartz

Remember that macOS is a UNIX operating system with Finder and graphical applications providing the user interface. In UNIX operating systems, there are filenames prefaced with a "." that are intended to be hidden and we collectively refer to this class of file as "dot files." Ordinarily, these are not files found in the Finder unless by way of using the cmd+shift+. shortcut.


From the Terminal, one can also use the chflags(1) utility to hide (hidden) or unhide (nohidden) specified files or folders. When hidden, these files remain unseen in a normal Finder view, and displayed as grayed out after a shift+command+. shortcut. If in the Terminal, one can identify these hidden files via


ls -lO *
-rw-r--r--@ 1 viking  staff  - 625227 Jan  6 17:42 172511.pdf
chflags hidden 172511.pdf
ls -lO
-rw-r--r--@ 1 viking  staff  hidden 625227 Jan  6 17:42 172511.pdf
chflags nohidden 172511.pdf
ls -lO *
-rw-r--r--@ 1 viking  staff  - 625227 Jan  6 17:42 172511.pdf


One can also detect hidden status with the stat(1) command:

stat -f '%Sf' 172511.pdf
hidden


Ordinarily non-dot files in the user space are not capriciously hidden by the operating system, but may be hidden based on system calls in developer application logic — however unlikely that occurrence.


If within an open Finder Window, a file that is hidden with chflags will not magically reappear when unhidden in that current Finder Window view until that view is refreshed by switching locations and back again.







Dec 1, 2023 5:04 PM in response to ndunn433

I've got MacBook air 13 2019. I have upgrade it from macOS 10 to Sonoma and too many files in my Desktop was marked as hidden.

For example - there was 20 files in your folder synchronised with iCloud Drive, but after upgrade - only 3.

So - you are able to press on folder and "remove download"

Then - try to press synchronise button.

There are 20 files will be downloaded (look it at status bar), but only 3 one will be in folder.

If you press cmd-shift-dot to see hidden files - they will stay visible.



All files was synchronised with iCloud Drive.

So you are able to look:

1) Open Terminal

2) cd ~/Desktop

3) find . -exec ls -lO {} \;|grep hidden

If you have such files you are able to clear this flag for all files in the tree by command:

4) chflags -R nohidden *

or for file:

4*) chflags nohidden file.txt


FYI If your file has attribute mask -rw------ - it's not standart, so i'm able to change it by the command:

chmod -R a+r *

So the mask will be -rw-r--r--

Nov 27, 2023 7:56 PM in response to skytalon1

That really doesn't help. I'd like to see my necessary files show permanently, instead of going back and forth using terminal. I have alot of files that became hidden. I solved the problem on my husband's side as he already has an imac and macbook air(mine). I copied the entire content from imac to an external drive and nuked the document folder in the macbook air and copied the documents folder back onto my macbook air. I don't have that option for my side since i only use my macbook air.

You can toggle the hidden files setting with cmd-shift-., but that isn't the answer, either.

I don't know why Apple Support would offer that except as a temporary measure to see them.


You can try copy/pasting this command in Terminal and leave a space after, then drag in the hidden files (show them with the shortcut, above).

chflags nohidden 

However, this depends on the hidden flag being the cause for them being hidden. Do you have only some files hidden, or are all of them hidden?

Dec 14, 2023 7:01 AM in response to ndunn433

I have this problem with files in my `Documents` folder since upgrading to Sonoma. If I run:


chflags -R nohidden .


it fixes the problem temporarily, but then it seems macOS sets the files back to hidden (almost immediately) so I'm fighting with the OS to keep my preference.


In my case these files are `.dotfiles` that get hidden.


This is particularly annoying because some of these files are scripts and executables that become unavailable when macOS hides them. I do want to keep these scripts backed up in iCloud, but I do not want to have them hidden.

Nov 27, 2023 5:06 PM in response to ST-Min

That really doesn't help. I'd like to see my necessary files show permanently, instead of going back and forth using terminal. I have alot of files that became hidden. I solved the problem on my husband's side as he already has an imac and macbook air(mine). I copied the entire content from imac to an external drive and nuked the document folder in the macbook air and copied the documents folder back onto my macbook air. I don't have that option for my side since i only use my macbook air.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

unhide files in Sonoma

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.