10

I have photos on my SD Card. I can not see the files on my Mac. I can see it in my camera and when I load the micro SD card in phone, I can see the pics. My Mac is not showing any files. I am assuming there could be some kind of virus that had made the files hidden.

I want to see these files in Terminal (just like I would do in DOS).

  • cd to the card and then ls -al? (I don't know if OSX has 'hidden' files - on Linux and BSD, a file is hidden if the filename starts with a '.' character.) – user55325 Mar 12 '12 at 2:36
  • my card name is "phone card" but cd "phone card" does not work – hk_ Mar 12 '12 at 2:58
  • 4
    You have to be in the directory where the OS mounts it - in OS X it's probably /Volumes, so you would need to cd "/Volumes/phone card" (or cd /Volumes/phone\ card). – user55325 Mar 12 '12 at 3:10
  • @user55325, that works, you can post it as answer. And extra help would be, how do I copy files from my SD card to my mac drive, lesser say documents folder. Thanks – hk_ Mar 12 '12 at 4:58
11

To list the contents of the card, first cd /Volumes/<card name> - in this case cd /Volumes/phone\ card (the \ escapes the space). Then you can do ls -al to list the files (hidden and visible) on the card.

If you want to copy files to somewhere else on the drive, you can use cp. For example, to copy files to your home directory, cp <some file> ~ (or to copy everything, cp -R ./* ~, where * means "match any character(s)" and ~ is short for your home directory (I don't remember the OS X default directory hierarchy). -R means copy directories recursively (if cp encounters a directory, it should copy the contents of the directory as well).

man cp will tell you more about cp (or any other command).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.