After I cancelled syncronization between my Mac and MEGA, my local target dictionary became empty. However, after I used du to acquire the disk status, I found my data are moved to ./.debris/2016-07-22/.... I tried chflags nohidden ./.debris/ to cancel the hidden status for ./.debris/ but the system still told me that chflags: ./.debris/: No such file or directory. Now how can I do to save my files?


1 Answer 1


The directory .debris is not hidden because of the flag, but because it contains . in the front. Such files and directories in Unix-based systems are considered hidden, and by default are not displayed in OS X GUI (and regular CLI ls command).

You can try just to move the subdirectory 2016-07-22 outside of the hidden directory:

mv -i ./.debris/2016-07-22 ~/2016-07-22

or rename the .debris directory with:

mv -i .debris debris

The error chflags: ./.debris/: No such file or directory is however strange, maybe you were executing chflags from a different directory. To be 100% sure, use absolute paths.

I guess your .debris is in your home directory, so you can use a ~ (tilde):

mv -i ~/.debris/2016-07-22 ~/2016-07-22


mv -i ~/.debris ~/debris

The -i flag protects you against overwriting (and losing) files if the destination directory existed. It's not likely, but better stay safe.

  • 1
    It works and thanks! Also, I just found that defaults write com.apple.finder AppleShowAllFiles YES ; killall Finder can show the directory also.
    – Wayne Tsai
    Commented Jul 22, 2016 at 13:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .