How can I unhide my files on MacBook Air after using the dot_clean command?

Ok this issue is boggling me. To give context I uploaded a folder to my Google drive and for some reason it was duplicating my files. It would upload a regular img_1001.jpg file along with a .img_1001.jpg file. I read this is some sort of Metadata file. I have no idea why it doesn't show that in my folder but it gets uploaded to Google drive. In any event I went online and found advice on a command to stop my macbook writing these files which i read are .appledouble files and used the following command


Dot_clean --keep=dotbar /volume


In addition i can't remember but i may have also used the following command


Find . -name. _\\* -delete


But I don't quite remember actually using that command


In any event now all my photos and videos on my external drive are all showing hidden. I thought I deleted everything somehow but when I press command and shift and . it shows all my files as grayed out. These are normal files like photos and video and not normally hidden system files. I have no idea how to fix this! I tried using a command to unhide the folder which worked but all the images in folder still grayed out. Please someone help! Thx!


[Re-Titled by Moderator]

Original Title: how to flag normal files to be unhidden

MacBook Air 13″

Posted on Aug 30, 2025 04:55 AM

Reply
6 replies

Aug 30, 2025 05:13 AM in response to ZenPanda

That command wouldn’t have hidden anything. You used it wrong for what you wanted to do, though. You told it to keep the metadata. dot_clean -m is what you needed.

To clear the hidden flag,

chflags -R nohidden <folder>

<folder> would be the path to the enclosing folder. If you just leave a space after the nohidden, you can drag the folder into the Terminal window to complete the path to the folder. Then hit return.

Is the folder on an external drive formatted in one of the FAT formats? I don’t know why it would be splitting off the resource fork otherwise. If it is, I don’t know if that format even has file flags and so that might not be why they are hidden.

Aug 30, 2025 05:28 AM in response to ZenPanda

ZenPanda wrote:

I thought I deleted everything somehow but when I press command and shift and . it shows all my files as grayed out.

Oh no. You definitely deleted everything.


In any event I went online and found advice on a command to stop my macbook writing these files

Don't believe advice you find on the internet. You'll wind up deleting all your files.


From what you describe, it sounds like this external drive was some kind of DOS-formatted FAT drive. That's why it would have those hidden metadata files in the first place. So, chances are, you can purchase a file recovery app and restore those files. You'll lose the original file names, but I guess you still have those somewhat. You'll just have to manually rename them all.


Good luck!


PS: Don't run Terminal commands from the Internet again.

Aug 30, 2025 05:48 AM in response to ZenPanda

ZenPanda wrote:

So it's weird I don't think the files are deleted as when I use the command and shift and . It unhides the files and shows up. The photos can even be viewed in preview window. But they are still grayed out. So just trying to unhide them.

The files are most definitely deleted. While the "find" command you posted above isn't correct, just must have run some functional version of it. When you added that "-delete" flag, it deleted those files.


What remains are the original metadata files. A FAT-formatted drive can't represent macOS metadata, so it create a a hidden dot file for each original file. That metadata file may include a low-resolution preview of the image. But the original is gone. You should be able to double-check this by the sizes of the files. Or try zooming in with Preview. If they get pixelated, then they are just low-res previews and the originals are gone.

Aug 30, 2025 05:52 AM in response to Barney-15E

Oh ok yes i the drive was fat formatted so I could access it from other computers.


But that's odd that now the drive shows all the files as hidden. I can still access and view the photos though. But when I use the command and shift and period they are all hidden away. Anyway thx that command actually worked to fix it. I just used it on the root folder of drive and I guess the -r must be recursive and applied to all sub-folders. Yay thx.

Aug 30, 2025 05:59 AM in response to etresoft

I appreciate your help with this. Ok so I double checked and all the photo files are the high resolution shots. I ended up using the command the other guy posted about and it appeared to fix the issue.


chflags -R nohidden <folder>


I just applied that to the main volume and It worked for all folders and subfolders and the high resolution photos are unhidden now. So I believe it's all good. I'm not sure i used the delete command in the first place it was just next on the list of commands to do when I read them online to try and delete the Metadata files.


Im pretty confused what happened here lol. But appears ok now thanks!


How can I unhide my files on MacBook Air after using the dot_clean command?

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