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

JonL12345

macrumors regular
Original poster
May 21, 2012
175
24
Looking at the screenshot below, you can see that the Desktop has zero items in it (bottom path). Then look a the top path, and it shows there are indeed items on the desktop, the Coding folder for a start.

So how is this possible? How can the desktop be empty and yet contain the Coding folder (at least)?

kxbfleiuiihb1.png
 
The first path only confirms there's a folder, containing 16 visible items, named "Coding" in the Desktop folder and not that there are other items in the Desktop folder…though there could be.

The second path is the puzzling one. The only way I know of to get what you are showing in both paths is if the "Coding" folder, and anything else in the Desktop folder, has been made invisible.

There are methods to hide files…and utilities that can hide or show all desktop items with a switch.
 
Code:
ls -leaO ~/Desktop
That was very useful, thanks. The attribute shows hidden next to all those files and folders on the Desktop.

How do I unhide them? (no idea how they got hidden in the first place)
 
Try this:
Code:
chflags nohidden ~/Desktop/*
If there are any items still marked as hidden, please post the output from the 'ls' cmd. Accuracy is important in cmds, and inaccurate cmds can break things.
 
I haven't run the command yet, but this is what is shown in terminal. Is
Code:
chflags nohidden ~/Desktop/*
still the best thing to run in this situation?

Also, are there options to unhide within Finder?

Bash:
$ ls -leaO ~/Desktop
total 576
drwxr-xr-x@  6 jonlawrance  staff  hidden    204  4 Jan  2021 $RECYCLE.BIN
drwx------+ 19 jonlawrance  staff  -         646 12 Mar 18:58 .
 0: group:everyone deny delete
 1: group:com.apple.sharepoint.group.2 allow search
drwxr-xr-x+ 68 jonlawrance  staff  -        2312  8 Aug 20:29 ..
 0: group:everyone deny delete
-rw-r--r--@  1 jonlawrance  staff  -       18436 11 Aug 20:37 .DS_Store
-rw-r--r--   1 jonlawrance  staff  -           0 24 Apr  2013 .localized
drwxr-xr-x@ 17 jonlawrance  staff  hidden    578  1 Jul  2020 Affinity Designer
drwxr-xr-x@ 11 jonlawrance  staff  hidden    374 22 Jul 18:43 Chess
drwxr-xr-x@  3 jonlawrance  staff  hidden    102 20 Feb  2021 ChessDashboard
drwxr-xr-x@ 10 jonlawrance  staff  hidden    340  7 Aug 19:33 Coding
drwxr-xr-x@  6 jonlawrance  staff  hidden    204 12 Mar  2021 Logos
-rw-r--r--@  1 jonlawrance  staff  hidden   1934 12 Mar 16:54 Microsoft Edge.lnk
drwxr-xr-x@ 15 jonlawrance  staff  hidden    510  7 Jun  2022 O
-rw-r--r--@  1 jonlawrance  staff  hidden    222 12 Mar 18:58 Rise of Nations Extended Edition.url
drwxrwxrwx@  9 jonlawrance  staff  hidden    306  7 Jun  2022 SuperMemo
-rw-r--r--@  1 jonlawrance  staff  hidden 235520 21 Feb  2021 Thumbs.db
-rw-r--r--@  1 jonlawrance  staff  hidden    844 18 Jun  2022 Ubuntu 18.04 (1)
drwxr-xr-x@  8 jonlawrance  staff  hidden    272  7 Jun  2022 Websites
-rw-r--r--@  1 jonlawrance  staff  hidden    840 12 Mar 16:15 Windows 10
-rw-r--r--@  1 jonlawrance  staff  hidden    282 12 Mar 16:52 desktop.ini
 
You can also toggle everything hidden by pressing Shift+Command+. (that's a period...)
Toggle invisibility by pressing the same 3 keys again.
 
You can also toggle everything hidden by pressing Shift+Command+. (that's a period...)
Toggle invisibility by pressing the same 3 keys again.
Is that everything hidden in that specific path or global?
 
I haven't run the command yet, but this is what is shown in terminal. Is
Code:
chflags nohidden ~/Desktop/*
still the best thing to run in this situation?

Also, are there options to unhide within Finder?

Bash:
$ ls -leaO ~/Desktop
total 576
drwxr-xr-x@  6 jonlawrance  staff  hidden    204  4 Jan  2021 $RECYCLE.BIN
drwx------+ 19 jonlawrance  staff  -         646 12 Mar 18:58 .
 0: group:everyone deny delete
 1: group:com.apple.sharepoint.group.2 allow search
drwxr-xr-x+ 68 jonlawrance  staff  -        2312  8 Aug 20:29 ..
 0: group:everyone deny delete
-rw-r--r--@  1 jonlawrance  staff  -       18436 11 Aug 20:37 .DS_Store
-rw-r--r--   1 jonlawrance  staff  -           0 24 Apr  2013 .localized
drwxr-xr-x@ 17 jonlawrance  staff  hidden    578  1 Jul  2020 Affinity Designer
drwxr-xr-x@ 11 jonlawrance  staff  hidden    374 22 Jul 18:43 Chess
drwxr-xr-x@  3 jonlawrance  staff  hidden    102 20 Feb  2021 ChessDashboard
drwxr-xr-x@ 10 jonlawrance  staff  hidden    340  7 Aug 19:33 Coding
drwxr-xr-x@  6 jonlawrance  staff  hidden    204 12 Mar  2021 Logos
-rw-r--r--@  1 jonlawrance  staff  hidden   1934 12 Mar 16:54 Microsoft Edge.lnk
drwxr-xr-x@ 15 jonlawrance  staff  hidden    510  7 Jun  2022 O
-rw-r--r--@  1 jonlawrance  staff  hidden    222 12 Mar 18:58 Rise of Nations Extended Edition.url
drwxrwxrwx@  9 jonlawrance  staff  hidden    306  7 Jun  2022 SuperMemo
-rw-r--r--@  1 jonlawrance  staff  hidden 235520 21 Feb  2021 Thumbs.db
-rw-r--r--@  1 jonlawrance  staff  hidden    844 18 Jun  2022 Ubuntu 18.04 (1)
drwxr-xr-x@  8 jonlawrance  staff  hidden    272  7 Jun  2022 Websites
-rw-r--r--@  1 jonlawrance  staff  hidden    840 12 Mar 16:15 Windows 10
-rw-r--r--@  1 jonlawrance  staff  hidden    282 12 Mar 16:52 desktop.ini
That 'ls' output looks like it's the result of this cmd:
Code:
chflags hidden ~/Desktop/*
In particular, everything whose name doesn't start with "." has the 'hidden' attribute.

If you use the 'chflags nohidden' cmd I gave before, it will make everything listed there as 'hidden' become non-hidden. Nothing else should change.

To me, the folder "$RECYCLE.BIN" looks like a name one might find on MS-DOS or Windows. If you shared ~/Desktop with Windows, it might have created it.

If you want it hidden:
Code:
chflags hidden ~/Desktop/'$RECYCLE.BIN'
The single quotes are required.

If you get an error message, post the exact text of the message.
 
  • Like
Reactions: JonL12345
Is that everything hidden in that specific path or global?
The keyboard shortcut unhides everything, even on other drives that you might have connected.
If you get the folder that you want to unhide (or simply a specific file) then the terminal commands will be a better choice for you. I like the keyboard shortcut, which I use quite often just to "see what I can't see", nice to have when I am trying to help a friend through some software issue. (There's your missing family movies!)
 
  • Like
Reactions: JonL12345
I ran
Code:
chflags nohidden ~/Desktop/*
and its all back to normal now. No idea how it happened in the first place.

Thanks guys. I can get coding again. I only discovered this issue when I launched vsCode and found my Coding folder missing.
 
  • Like
Reactions: chown33
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.