LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Can't open text files transferred from Mac to Linux on Flash Drive (https://www.linuxquestions.org/questions/linux-newbie-8/cant-open-text-files-transferred-from-mac-to-linux-on-flash-drive-901303/)

sdgalbo 09-05-2011 06:55 PM

Can't open text files transferred from Mac to Linux on Flash Drive
 
Hi, I just transferred a load of files from my old G4 Powerpc os x 10.39 to a thumb drive as backup before converting the mac to an Ubuntu for powerpc 10.4 machine. One of the issues I've run into is that the text files won't open in linux now. That includes doc and pdf files. I tried to open them in my windows xp partition on another machine and they won't open there either. I noticed in xp that each folder has a .ds_store file associated with the text file. I understand that file is generated by the mac finder to keep track of relevant data about icons, location etc. I did not think the file itself would be corrupted though. But I cannot open them. I can open music files and photos, which do not have a problem being imported into my linux distro. Anyone have any ideas on how to salvage my doc and pdf files?

Thanks, sdgalbo

cheddarcheese 09-05-2011 08:12 PM

What are you trying to open them with in Ubuntu, and what happens when you do try to open them?

Also, how did you put them onto the thumb drive? Did you FTP them on?

You say that they are text files, but in actual fact both .doc and .pdf are binary files. I'm just wondering if you FTP'd them onto the thumb drive in ASCII mode, and whether that's why you can't open them with the associated applications... Just a thought!

sdgalbo 09-06-2011 10:00 AM

Thanks for your response cheddarcheese,

To answer your questions:

1. What are you trying to open them with in Ubuntu? My response: I copy a file from the thumb drive to the desktop (rt. click --> copy--> paste to desktop). Then I would double click on the file and pdfs would try to open in document viewer or xpdf. Word files would try to open in Open Office Writer (a couple of them did open, but most would not).

2. Your Question: what happens when you do try to open them? My response: Document viewer gives me a message telling me the file could not be opened because the document is damaged. Open office writer says "General error, input output error. Every once in a while some files open without a problem.

3. You asked: I'm just wondering if you FTP'd them onto the thumb drive in ASCII mode, and whether that's why you can't open them with the associated applications...

My response: No, I copied the folders to the thumb drive attached to the same computer, drag and drop. The files seemed to copy just fine.

Since each file has a second file associated in it (as viewed in windows), is there a way of re-associating the files or extracting the information from the main text (Word or pdf) file?

Much appreciated

sdgalbo

jdkaye 09-06-2011 10:35 AM

Quote:

Originally Posted by sdgalbo (Post 4462945)
Since each file has a second file associated in it (as viewed in windows), is there a way of re-associating the files or extracting the information from the main text (Word or pdf) file?
sdgalbo

My closest collaborator uses a Mac :( and I get files from him of various sorts: pdf, tex, mp3, png, etc. etc. and I have never had a problem with them. They have all performed normally when opened with the appropriate software. Yes, indeed. Mac has that annoying property of containing an extra file that has no use as far as I can see, in Linux. I would just delete them.

If the files are damaged it may have to do with the file system of your pen drive. I guess it was formatted by your old Mac. What file system did you use? Do you have any real plain text files you can test?
ciao,
jdk

sdgalbo 09-06-2011 12:56 PM

All I used was a standard kingston 32GB flash drive. I did not reformat it, but used it "as is, out of the box." Up until yesterday, I would have agreed with you 100% about opening mac files on linux. I have done it hundreds of times myself with no problem. I think this has to do with transferring whole folders from Mac to linux, not just individual files. The files that I copied individually open fine. But the files in the folders that I drug over from the mac hard disk to the flash drive do not open in linux. I think that is because of the .ds_store files and the other associated files in each folder. I think .ds_store is created to keep track of file info within a folder. I have copied the main file to another location, to see if it would work, and it doesn't.

For comparison, music and photos were not copied over as folders, but as files, and they open just fine. If I am right, what I need to know is this: will deleting the associated files allow the main file to work? Or... is there any other way to put those files back together? I hope I'm making sense.

Thanks for your time,

sdgalbo

jdkaye 09-06-2011 01:05 PM

I've no experience in this. You're right, I have always dealt with individual files and not with folders. I always deleted the superfluous Mac stuff and no harm was done. I can't really say about the folders though.
good luck,
jdk

sdgalbo 09-06-2011 05:02 PM

Thanks jdk, much appreciated. I think I'll check out the Mac forums on this. This has to be an issue with others migrating information around different operating systems.

btw... on the previous problem with linux not recognizing the dvd/cdrom media? Kubuntu 10.04 ppc fixed that problem, but absolutely would not reboot on my G4 imac ppc. Ubuntu 10.10 was supposed to fix it too, but it didn't and ran very slowly on my imac, so I went back to Ubuntu Gnome 10.04. Runs great except for the cdrom drive. I think I'll try buying an external USB dvd/cdrom and see if that will fix it. I'll experiment on mine before I try to "fix" my daughter's old ibook. Some claim an external will work. Hope it does! Anyway, thanks!

sdgalbo

impert 09-06-2011 05:23 PM

Have you checked that it's not a permissions/ownership problem? It's a while since I used my Mac, but things I tried to shift from OS X to Linux tended to belong to 99. You might have to do some aggressive chowning and chmoding.

macemoneta 09-06-2011 05:42 PM

Did you safely unmount the drive on the Mac? If you just pull the flash drive out, some files will be corrupted.

sdgalbo 09-06-2011 09:44 PM

No, I generally do a very good job of ejecting the flash drive before I pull it out. I always wait for the desktop icon to disappear after ejecting / unmounting. From the research I have done so far, it appears that when I pulled whole folders from the mac finder over to the flash drive, I created a grunch of .ds_store and other associated files. I will probably have to put the flash drive on a mac and eliminate the .ds_store files there. As it stands now, pertinent information for the text files to open are shared between two files, not one. They need to be combined and I believe that can only be done on a mac. My question now is this: can any mac do it? Or did it need to be done on the imac I've already turned into a linux machine (in that case, out of luck : (

I do need to check into the permissions issue, as impert has suggested above. In fact it may be both an ownership AND a mac filing problem. I may have to go to a mac forum to find the answer though.

Thanks guys,

sdgalbo

AnanthaP 09-06-2011 10:27 PM

Quote:

I can open music files and photos, which do not have a problem being imported into my linux distro
Since some files open correctly, clearly it is something specific to the file or format. Could it be things like special fonts, etc? Or different versions of word files. Eg. docx .v. doc. Could you examine the "save as" or equivalent options in the mac to save in the format that works?

Likewise with pdf files.

OK

sdgalbo 09-07-2011 08:49 AM

Good suggestions, My basic problem right now is that because I overwrote the whole mac partition with Ubuntu, I currently have no mac to go back to. But I am curious as to whether these files on the flash drive will still open in a mac. But, for now, I will try and see if there is anything noticeably different between a doc or pdf file that WILL open, and one that WON'T. Good suggestion. Thanks!

sdgalbo

AnanthaP 09-07-2011 07:39 PM

Quote:

But I am curious as to whether these files on the flash drive will still open in a mac.
Good point. Please do so. Is it possible to find and post the data to a web based service if you dont have an apple user / group nearby.

OK

sdgalbo 09-08-2011 08:43 AM

I will wait a week or two to try out the files on another mac. My daughter comes home from college in a week or two and I'll try opening them from her powerbook.

sdgalbo

carolinason 09-08-2011 10:40 AM

does mac still store a file in two places? it seems that one is the data and one is some sort of pointer file. see if you can cat them in BASH.


All times are GMT -5. The time now is 01:53 PM.