MacOS – chflags nohidden not unhiding hidden files

catalinacommand linefindermacos

Problem: because of an unkown reason all my desktop files and folders were hidden. i managed do unhide all folders, but i can't unhide the files

i tried to unhide the files via terminal chflags nohidden filename but it doesn't work. i also checked if the hidden flag is placed, but there is no hidden flag on the files (but they aren't visible). here is the output via terminalcommand ls -lo:

-rw-r--r--@ 1 username 13669 19 Aug 11:54 filename.txt

i also tried an app called InvisibliX (which isn't under development anymore), with no success
and of course i used the searching function, which lead me to this: How to unhide files on Mac? with no further success

I'm thankful for every hint you may have for me!

Some additional information regarding the OS:
Mac OS X Catalina 10.15.6

Best Answer

  • Once I copied files via terminal from an iPod to a Mac and somehow they appeared hidden, chflags nohidden <filename> did not work, neither the same command with different option flags. Finally, I found this answer which worked fine. So:

    1. xattr -d <filename>
    2. chflags nohidden <filename>
    3. killall Finder (just in case)

    I did it using * so I did not have to go one by one. Hope it helps,