How are these folders invisible

finderinvisible-files

I copied some music off a friend's old iPod for him by mounting it and using Terminal to copy the "iPod Control" folder to my desktop (High Sierra).

However, that folder (the original, as well as the copy on my desktop) contains a "Music" folder that's invisible, and "Music" contains a bunch of other folders that are invisible. By "invisible" I mean that I can see them just fine in Terminal, but I can only see them in the Finder if I press Command-Option-. or run defaults write com.apple.finder AppleShowAllFiles TRUE.

My question is: how are these folders invisible? When I show them and do a "Get Info" on them, I don't see anything that would indicate that the Finder should hide them. They don't have a period at the start of their names. Even if I do a ls -l@ in Terminal I don't see anything unusual about them.

How do I un-set these folders' invisibility so that Finder will display them normally?

Best Answer

Files and folders can have the ‘hidden’ flag set.

  • ls can show flags with ls -lO (capital letter O).
  • Set the hidden flag with chflags hidden /path/to/file.
  • Remove the hidden flag with

    chflags nohidden /path/to/file