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

wandrer2

macrumors member
Original poster
Feb 9, 2010
70
0
I am migrating from Windows (Vista) to Mac OS X. Because my old laptop died, I put its (still functional) harddisk in an external USB enclosure, and am recovering my data from there.

Windows puts some stuff in hidden directories (such as ProgramData on C: and - more importantly - AppData in my old home directory, in which my e-mail is stored). Finder does not show them, but in the terminal I can see them.

I did the following in my terminal

mkdir ~/oldstuff/ProgramData
cd /Volumes/Untitled
cd ProgramData
cp -R . ~/oldstuff/ProgramData

Result: files get copied to my Mac's harddisk, but the ProgramData folder in my oldstuff folder disappears from Finder!

If I do an 'ls -l', the directory permissions show up as
drwxr-xr-x@
Note the weird @ symbol.

Solution (after a considerable amount of googling):

cd ~/oldstuff
chflags nohidden ProgramData

Is there not an easier solution than this?
 
I am migrating from Windows (Vista) to Mac OS X. Because my old laptop died, I put its (still functional) harddisk in an external USB enclosure, and am recovering my data from there.

Windows puts some stuff in hidden directories (such as ProgramData on C: and - more importantly - AppData in my old home directory, in which my e-mail is stored). Finder does not show them, but in the terminal I can see them.

I did the following in my terminal

mkdir ~/oldstuff/ProgramData
cd /Volumes/Untitled
cd ProgramData
cp -R . ~/oldstuff/ProgramData

Result: files get copied to my Mac's harddisk, but the ProgramData folder in my oldstuff folder disappears from Finder!

If I do an 'ls -l', the directory permissions show up as
drwxr-xr-x@
Note the weird @ symbol.

Solution (after a considerable amount of googling):

cd ~/oldstuff
chflags nohidden ProgramData

Is there not an easier solution than this?

I'm not familiar with Windows/NTFS.

It's interesting that that extended attribute (hidden) was affected that way... and i would assume a Mac HFS+ filesystem would not have anything in common with such extended attributes coming from some foreign filesystem.

Therefore, perhaps using the -X option with cp would eliminate their transference. I.e.,

cp -R -X /Volumes/Untitled/ProgramData ~/oldstuff/
 
Thanks, the -X option indeed does the trick!

I still find it slightly outrageous that I have to use the terminal to see hidden files (same goes for .blah files in OS X itself, apparently), but luckily this is a one-time thing.
 
I still find it slightly outrageous that I have to use the terminal to see hidden files (same goes for .blah files in OS X itself, apparently), but luckily this is a one-time thing.
You probably already know this Finder tweak then, (but i'll post it anyway):

defaults write com.apple.finder AppleShowAllFiles -bool YES
killall Finder

Now Finder shows dot-files (kinda annoying i think).
Just change YES to NO to revert to normal viewing.
 
This also works to browse hidden files on your Boot Camp NTFS disk

Thanks, Hal.

This also works to browse hidden files on your Boot Camp NTFS disk.

You probably already know this Finder tweak then, (but i'll post it anyway):

defaults write com.apple.finder AppleShowAllFiles -bool YES
killall Finder
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.